winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2018
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Jacek Caban : widl: Use for_each_iface in get_size_procformatstring.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 3a8dbbb63447752494a7427bbede52f78c43da37 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a8dbbb63447752494a7427b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 7 16:14:42 2018 +0100 widl: Use for_each_iface in get_size_procformatstring. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/typegen.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index f2061b0..10e6eba 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -4537,30 +4537,21 @@ unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *fu return offset; } -unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred) +static void get_size_procformatstring_iface(type_t *iface, FILE *file, int indent, unsigned int *size) { const statement_t *stmt; - unsigned int size = 1; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) { - const type_t *iface; - const statement_t *stmt_func; - - if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) - continue; - - iface = stmt->u.type; - if (!pred(iface)) - continue; - - STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt_func->u.var; - if (!is_local(func->attrs)) - size += get_size_procformatstring_func( iface, func ); - } + const var_t *func = stmt->u.var; + if (!is_local(func->attrs)) + *size += get_size_procformatstring_func( iface, func ); } +} + +unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred) +{ + unsigned int size = 1; + for_each_iface(stmts, get_size_procformatstring_iface, pred, NULL, 0, &size); return size; }
1
0
0
0
Jacek Caban : widl: Use for_each_iface in process_tfs.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 212cffbf996d6134c47011686645b4fac95f8d67 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=212cffbf996d6134c4701168…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 7 16:14:31 2018 +0100 widl: Use for_each_iface in process_tfs. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/typegen.c | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 5e4b36d..f2061b0 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -3675,52 +3675,35 @@ static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *ty return write_type_tfs(file, 2, attrs, type, name, write_ptr ? TYPE_CONTEXT_CONTAINER : TYPE_CONTEXT_CONTAINER_NO_POINTERS, tfsoff); } -static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts, - type_pred_t pred, unsigned int *typeformat_offset) +static void process_tfs_iface(type_t *iface, FILE *file, int indent, unsigned int *offset) { + const statement_t *stmt_func; var_t *var; - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + current_iface = iface; + STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(iface) ) { - const type_t *iface; - const statement_t *stmt_func; + const var_t *func = stmt_func->u.var; + current_func = func; + if (is_local(func->attrs)) continue; - if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) - continue; + var = type_function_get_retval(func->type); + if (!is_void(var->type)) + var->typestring_offset = write_type_tfs( file, 2, func->attrs, var->type, func->name, + TYPE_CONTEXT_PARAM, offset); - iface = stmt->u.type; - if (!pred(iface)) - continue; - - current_iface = iface; - STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt_func->u.var; - current_func = func; - if (is_local(func->attrs)) continue; - - var = type_function_get_retval(func->type); - if (!is_void(var->type)) - var->typestring_offset = write_type_tfs( file, 2, func->attrs, var->type, func->name, - TYPE_CONTEXT_PARAM, typeformat_offset); - - if (type_get_function_args(func->type)) - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), var_t, entry ) - var->typestring_offset = write_type_tfs( file, 2, var->attrs, var->type, var->name, - TYPE_CONTEXT_TOPLEVELPARAM, - typeformat_offset ); - } + if (type_get_function_args(func->type)) + LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), var_t, entry ) + var->typestring_offset = write_type_tfs( file, 2, var->attrs, var->type, var->name, + TYPE_CONTEXT_TOPLEVELPARAM, offset ); } - - return *typeformat_offset + 1; } static unsigned int process_tfs(FILE *file, const statement_list_t *stmts, type_pred_t pred) { unsigned int typeformat_offset = 2; - - return process_tfs_stmts(file, stmts, pred, &typeformat_offset); + for_each_iface(stmts, process_tfs_iface, pred, file, 0, &typeformat_offset); + return typeformat_offset + 1; }
1
0
0
0
Jacek Caban : widl: Introduce for_each_iface helper and use it in write_procformatstring.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 53e54833f65475de30748564cd53dc892160eb51 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=53e54833f65475de30748564…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 7 16:14:20 2018 +0100 widl: Introduce for_each_iface helper and use it in write_procformatstring. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/typegen.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index ce4c578..5e4b36d 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1465,27 +1465,34 @@ static void write_procformatstring_func( FILE *file, int indent, const type_t *i } } -static void write_procformatstring_stmts(FILE *file, int indent, const statement_list_t *stmts, - type_pred_t pred, unsigned int *offset) +static void for_each_iface(const statement_list_t *stmts, + void (*proc)(type_t *iface, FILE *file, int indent, unsigned int *offset), + type_pred_t pred, FILE *file, int indent, unsigned int *offset) { const statement_t *stmt; + type_t *iface; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) { - if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - const statement_t *stmt_func; - const type_t *iface = stmt->u.type; - const type_t *parent = type_iface_get_inherit( iface ); - int count = parent ? count_methods( parent ) : 0; + if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) + continue; + iface = stmt->u.type; + if (!pred(iface)) continue; + proc(iface, file, indent, offset); + } +} - if (!pred(iface)) continue; - STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(iface)) - { - var_t *func = stmt_func->u.var; - if (is_local(func->attrs)) continue; - write_procformatstring_func( file, indent, iface, func, offset, count++ ); - } - } +static void write_iface_procformatstring(type_t *iface, FILE *file, int indent, unsigned int *offset) +{ + const statement_t *stmt; + const type_t *parent = type_iface_get_inherit( iface ); + int count = parent ? count_methods( parent ) : 0; + + STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) + { + var_t *func = stmt->u.var; + if (is_local(func->attrs)) continue; + write_procformatstring_func( file, indent, iface, func, offset, count++ ); } } @@ -1501,7 +1508,7 @@ void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred print_file(file, indent, "{\n"); indent++; - write_procformatstring_stmts(file, indent, stmts, pred, &offset); + for_each_iface(stmts, write_iface_procformatstring, pred, file, indent, &offset); print_file(file, indent, "0x0\n"); indent--;
1
0
0
0
Jacek Caban : widl: Support async interfaces in headers generation.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 069d7b02b7ef2e70cfc66010728293e51bee806a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=069d7b02b7ef2e70cfc66010…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 7 16:14:06 2018 +0100 widl: Support async interfaces in headers generation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/header.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index 92bd391..c4b26d3 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -1611,8 +1611,13 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts) case STMT_TYPE: if (type_get_type(stmt->u.type) == TYPE_INTERFACE) { - if (is_object(stmt->u.type) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE)) - write_forward(header, stmt->u.type); + type_t *iface = stmt->u.type; + if (is_object(iface) || is_attr(iface->attrs, ATTR_DISPINTERFACE)) + { + write_forward(header, iface); + if (iface->details.iface->async_iface) + write_forward(header, iface->details.iface->async_iface); + } } else if (type_get_type(stmt->u.type) == TYPE_COCLASS) write_coclass_forward(header, stmt->u.type); @@ -1647,12 +1652,18 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons if (type_get_type(stmt->u.type) == TYPE_INTERFACE) { type_t *iface = stmt->u.type; + type_t *async_iface = iface->details.iface->async_iface; if (is_object(iface)) is_object_interface++; if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type)) { write_com_interface_start(header, iface); write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE); write_com_interface_end(header, iface); + if (async_iface) + { + write_com_interface_start(header, async_iface); + write_com_interface_end(header, async_iface); + } } else {
1
0
0
0
Jacek Caban : widl: Create type for async variant of an interface with async_uuid attribute.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: b467f2de9b23599d936a421610bcd79338c088aa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b467f2de9b23599d936a4216…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 7 16:13:47 2018 +0100 widl: Create type for async variant of an interface with async_uuid attribute. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/parser.y | 106 +++++++++++++++++++++++++++++++++++++++++++++++-- tools/widl/typetree.c | 3 ++ tools/widl/widltypes.h | 1 + 3 files changed, 107 insertions(+), 3 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 0f85498..757d796 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -113,6 +113,8 @@ const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func); static void check_def(const type_t *t); +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); @@ -909,6 +911,7 @@ interfacedef: interfacehdr inherit if($$ == $2) error_loc("Interface can't inherit from itself\n"); type_interface_define($$, $2, $4); + check_async_uuid($$); pointer_default = $1.old_pointer_default; } /* MIDL is able to import the definition of a base class from inside the @@ -1236,10 +1239,13 @@ static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_lis return new_list; } -static attr_list_t *dupattrs(const attr_list_t *list) +typedef int (*map_attrs_filter_t)(attr_list_t*,const attr_t*); + +static attr_list_t *map_attrs(const attr_list_t *list, map_attrs_filter_t filter) { attr_list_t *new_list; const attr_t *attr; + attr_t *new_attr; if (!list) return NULL; @@ -1247,7 +1253,8 @@ static attr_list_t *dupattrs(const attr_list_t *list) list_init( new_list ); LIST_FOR_EACH_ENTRY(attr, list, const attr_t, entry) { - attr_t *new_attr = xmalloc(sizeof(*new_attr)); + if (filter && !filter(new_list, attr)) continue; + new_attr = xmalloc(sizeof(*new_attr)); *new_attr = *attr; list_add_tail(new_list, &new_attr->entry); } @@ -1297,7 +1304,7 @@ static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t { attr_list_t *attrs; declspec->type = duptype(type, 1); - attrs = dupattrs(type->attrs); + attrs = map_attrs(type->attrs, NULL); declspec->type->attrs = append_attr_list(attrs, declspec->attrs); declspec->attrs = NULL; } @@ -1734,6 +1741,18 @@ var_t *make_var(char *name) return v; } +static var_t *copy_var(var_t *src, char *name, map_attrs_filter_t attr_filter) +{ + var_t *v = xmalloc(sizeof(var_t)); + v->name = name; + v->type = src->type; + v->attrs = map_attrs(src->attrs, attr_filter); + v->eval = src->eval; + v->stgclass = src->stgclass; + v->loc_info = src->loc_info; + return v; +} + static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *d) { if (!d) return list; @@ -2742,6 +2761,87 @@ static void check_functions(const type_t *iface, int is_inside_library) } } +static char *concat_str(const char *prefix, const char *str) +{ + char *ret = xmalloc(strlen(prefix) + strlen(str) + 1); + strcpy(ret, prefix); + strcat(ret, str); + return ret; +} + +static int async_iface_attrs(attr_list_t *attrs, const attr_t *attr) +{ + switch(attr->type) + { + case ATTR_UUID: + return 0; + case ATTR_ASYNCUUID: + append_attr(attrs, make_attrp(ATTR_UUID, attr->u.pval)); + return 0; + default: + return 1; + } +} + +static int arg_in_attrs(attr_list_t *attrs, const attr_t *attr) +{ + return attr->type != ATTR_OUT && attr->type != ATTR_RETVAL; +} + +static int arg_out_attrs(attr_list_t *attrs, const attr_t *attr) +{ + return attr->type != ATTR_IN; +} + +static void check_async_uuid(type_t *iface) +{ + statement_list_t *stmts = NULL; + statement_t *stmt; + type_t *async_iface; + type_t *inherit; + + if (!is_attr(iface->attrs, ATTR_ASYNCUUID)) return; + + inherit = iface->details.iface->inherit; + if (inherit && strcmp(inherit->name, "IUnknown")) + inherit = inherit->details.iface->async_iface; + if (!inherit) + error_loc("async_uuid applied to an interface with incompatible parent\n"); + + async_iface = get_type(TYPE_INTERFACE, concat_str("Async", iface->name), iface->namespace, 0); + async_iface->attrs = map_attrs(iface->attrs, async_iface_attrs); + + STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) + { + var_t *begin_func, *finish_func, *func = stmt->u.var, *arg; + var_list_t *begin_args = NULL, *finish_args = NULL, *args; + + args = func->type->details.function->args; + if (args) LIST_FOR_EACH_ENTRY(arg, args, var_t, entry) + { + if (is_attr(arg->attrs, ATTR_IN) || !is_attr(arg->attrs, ATTR_OUT)) + begin_args = append_var(begin_args, copy_var(arg, strdup(arg->name), arg_in_attrs)); + if (is_attr(arg->attrs, ATTR_OUT)) + finish_args = append_var(finish_args, copy_var(arg, strdup(arg->name), arg_out_attrs)); + } + + begin_func = copy_var(func, concat_str("Begin_", func->name), NULL); + begin_func->type = type_new_function(begin_args); + begin_func->type->attrs = func->attrs; + begin_func->type->details.function->retval = func->type->details.function->retval; + stmts = append_statement(stmts, make_statement_declaration(begin_func)); + + finish_func = copy_var(func, concat_str("Finish_", func->name), NULL); + finish_func->type = type_new_function(finish_args); + finish_func->type->attrs = func->attrs; + finish_func->type->details.function->retval = func->type->details.function->retval; + stmts = append_statement(stmts, make_statement_declaration(finish_func)); + } + + type_interface_define(async_iface, inherit, stmts); + iface->details.iface->async_iface = async_iface->details.iface->async_iface = async_iface; +} + static void check_statements(const statement_list_t *stmts, int is_inside_library) { const statement_t *stmt; diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 10657b0..b93806b 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -444,6 +444,7 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm iface->details.iface->stmts = stmts; iface->details.iface->inherit = inherit; iface->details.iface->disp_inherit = NULL; + iface->details.iface->async_iface = NULL; iface->defined = TRUE; compute_method_indexes(iface); } @@ -457,6 +458,7 @@ void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *met iface->details.iface->inherit = find_type("IDispatch", NULL, 0); if (!iface->details.iface->inherit) error_loc("IDispatch is undefined\n"); iface->details.iface->disp_inherit = NULL; + iface->details.iface->async_iface = NULL; iface->defined = TRUE; compute_method_indexes(iface); } @@ -470,6 +472,7 @@ void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface) dispiface->details.iface->inherit = find_type("IDispatch", NULL, 0); if (!dispiface->details.iface->inherit) error_loc("IDispatch is undefined\n"); dispiface->details.iface->disp_inherit = iface; + dispiface->details.iface->async_iface = NULL; dispiface->defined = TRUE; compute_method_indexes(dispiface); } diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index b4eb003..08584de 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -344,6 +344,7 @@ struct iface_details var_list_t *disp_props; struct _type_t *inherit; struct _type_t *disp_inherit; + struct _type_t *async_iface; }; struct module_details
1
0
0
0
Dmitry Timoshkov : server: Map FILE_NOTIFY_CHANGE_LAST_ACCESS to IN_MODIFY.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: bfa98dbb1ba8db7c43a16ad520c65fcdc00c7769 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfa98dbb1ba8db7c43a16ad5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 6 17:05:56 2018 +0300 server: Map FILE_NOTIFY_CHANGE_LAST_ACCESS to IN_MODIFY. Using IN_ACCESS leads to generating stray change notifications. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/change.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/change.c b/server/change.c index 3335e7a..3dd52aa 100644 --- a/server/change.c +++ b/server/change.c @@ -742,11 +742,9 @@ static unsigned int filter_from_event( struct inotify_event *ie ) if (ie->mask & (IN_MOVED_FROM | IN_MOVED_TO | IN_DELETE | IN_CREATE)) filter |= FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME; if (ie->mask & IN_MODIFY) - filter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE; + filter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS; if (ie->mask & IN_ATTRIB) filter |= FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SECURITY; - if (ie->mask & IN_ACCESS) - filter |= FILE_NOTIFY_CHANGE_LAST_ACCESS; if (ie->mask & IN_CREATE) filter |= FILE_NOTIFY_CHANGE_CREATION; @@ -979,7 +977,7 @@ static int map_flags( unsigned int filter ) if (filter & FILE_NOTIFY_CHANGE_LAST_WRITE) mask |= IN_MODIFY; if (filter & FILE_NOTIFY_CHANGE_LAST_ACCESS) - mask |= IN_ACCESS; + mask |= IN_MODIFY; if (filter & FILE_NOTIFY_CHANGE_SECURITY) mask |= IN_ATTRIB;
1
0
0
0
Dmitry Timoshkov : server: Don' t stop processing change notifications when name length is 0.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 48e5273cd5487b2e4b5149bb8b32916de417c0cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=48e5273cd5487b2e4b5149bb…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 6 17:05:43 2018 +0300 server: Don't stop processing change notifications when name length is 0. It's legitimate to receive a notification with len = 0. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/change.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/change.c b/server/change.c index d00a885..3335e7a 100644 --- a/server/change.c +++ b/server/change.c @@ -949,11 +949,9 @@ static void inotify_poll_event( struct fd *fd, int event ) for( ofs = 0; ofs < r - offsetof(struct inotify_event, name); ) { ie = (struct inotify_event*) &buffer[ofs]; - if (!ie->len) - break; ofs += offsetof( struct inotify_event, name[ie->len] ); if (ofs > r) break; - inotify_notify_all( ie ); + if (ie->len) inotify_notify_all( ie ); } }
1
0
0
0
Jacek Caban : user32: Allow scrollbar control to store scroll info in subclassed window.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 8c8701befb785b93a1ca6e42241f0b112ffd7069 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c8701befb785b93a1ca6e42…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 6 13:31:22 2018 +0100 user32: Allow scrollbar control to store scroll info in subclassed window. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46004
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45966
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/scroll.c | 35 +++++++++++++++++++++++++++++------ dlls/user32/tests/scroll.c | 1 - 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 30a0cd9..37095df 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -50,6 +50,14 @@ typedef struct SCROLLBAR_INFO vert; } WINSCROLLBAR_INFO, *LPWINSCROLLBAR_INFO; +typedef struct +{ + DWORD magic; + SCROLLBAR_INFO info; +} SCROLLBAR_WNDDATA; + +#define SCROLLBAR_MAGIC 0x5c6011ba + /* Minimum size of the rectangle between the arrows */ #define SCROLL_MIN_RECT 4 @@ -118,7 +126,7 @@ const struct builtin_class_descr SCROLL_builtin_class = scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ WINPROC_SCROLLBAR, /* proc */ - sizeof(SCROLLBAR_INFO), /* extra */ + sizeof(SCROLLBAR_WNDDATA), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ }; @@ -159,8 +167,13 @@ static SCROLLBAR_INFO *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc ) if (wndPtr->pScroll) infoPtr = &((LPWINSCROLLBAR_INFO)wndPtr->pScroll)->vert; break; case SB_CTL: - if (get_class_winproc( wndPtr->class ) == BUILTIN_WINPROC( WINPROC_SCROLLBAR )) - infoPtr = (SCROLLBAR_INFO *)wndPtr->wExtra; + if (wndPtr->cbWndExtra >= sizeof(SCROLLBAR_WNDDATA)) + { + SCROLLBAR_WNDDATA *data = (SCROLLBAR_WNDDATA*)wndPtr->wExtra; + if (data->magic == SCROLLBAR_MAGIC) + infoPtr = &data->info; + } + if (!infoPtr) WARN("window is not a scrollbar control\n"); break; case SB_BOTH: WARN("with SB_BOTH\n"); @@ -1131,18 +1144,28 @@ void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt ) */ static void SCROLL_CreateScrollBar(HWND hwnd, LPCREATESTRUCTW lpCreate) { - LPSCROLLBAR_INFO info = SCROLL_GetInternalInfo(hwnd, SB_CTL, TRUE); - if (!info) return; + LPSCROLLBAR_INFO info = NULL; + WND *win; TRACE("hwnd=%p lpCreate=%p\n", hwnd, lpCreate); + win = WIN_GetPtr(hwnd); + if (win->cbWndExtra >= sizeof(SCROLLBAR_WNDDATA)) + { + SCROLLBAR_WNDDATA *data = (SCROLLBAR_WNDDATA*)win->wExtra; + data->magic = SCROLLBAR_MAGIC; + info = &data->info; + } + else WARN("Not enough extra data\n"); + WIN_ReleasePtr(win); + if (!info) return; + if (lpCreate->style & WS_DISABLED) { info->flags = ESB_DISABLE_BOTH; TRACE("Created WS_DISABLED scrollbar\n"); } - if (lpCreate->style & (SBS_SIZEGRIP | SBS_SIZEBOX)) { if (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN) diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c index 1ff9b39..43d4720 100644 --- a/dlls/user32/tests/scroll.c +++ b/dlls/user32/tests/scroll.c @@ -640,7 +640,6 @@ static void test_subclass(void) memset(&scroll_info, 0xcc, sizeof(scroll_info)); scroll_info.cbSize = sizeof(scroll_info); res = SendMessageA(hwnd, SBM_GETSCROLLBARINFO, 0, (LPARAM)&scroll_info); - todo_wine ok(res == 1, "SBM_GETSCROLLBARINFO returned %lu\n", res); DestroyWindow(hwnd);
1
0
0
0
Nikolay Sivov : dwrite/tests: Test run bidi level too.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: a090314c723354bebb0992ec05ef33a60fd685fe URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a090314c723354bebb0992ec…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 7 15:38:31 2018 +0300 dwrite/tests: Test run bidi level too. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/layout.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index a117ca0..6aaf792 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -311,6 +311,7 @@ struct drawcall_entry { WCHAR string[10]; /* only meaningful for DrawGlyphRun() */ WCHAR locale[LOCALE_NAME_MAX_LENGTH]; UINT32 glyphcount; /* only meaningful for DrawGlyphRun() */ + UINT32 bidilevel; }; struct drawcall_sequence @@ -432,6 +433,17 @@ static void ok_sequence_(struct drawcall_sequence **seq, int sequence_index, ok_(file, line) (expected->glyphcount == actual->glyphcount, "%s: wrong glyph count, %u was expected, but got %u instead\n", context, expected->glyphcount, actual->glyphcount); + + if (expected->bidilevel != actual->bidilevel && todo) { + failcount++; + todo_wine + ok_(file, line) (0, "%s: wrong bidi level, %u was expected, but got %u instead\n", + context, expected->bidilevel, actual->bidilevel); + } + else + ok_(file, line) (expected->bidilevel == actual->bidilevel, + "%s: wrong bidi level, %u was expected, but got %u instead\n", + context, expected->bidilevel, actual->bidilevel); } else if ((expected->kind & DRAW_KINDS_MASK) == DRAW_UNDERLINE) { int cmp = lstrcmpW(expected->locale, actual->locale); @@ -606,6 +618,7 @@ static HRESULT WINAPI testrenderer_DrawGlyphRun(IDWriteTextRenderer *iface, ok(lstrlenW(descr->localeName) < LOCALE_NAME_MAX_LENGTH, "unexpectedly long locale name\n"); lstrcpyW(entry.locale, descr->localeName); entry.glyphcount = run->glyphCount; + entry.bidilevel = run->bidiLevel; add_call(sequences, RENDERER_ID, &entry); return S_OK; } @@ -1681,14 +1694,22 @@ static const struct drawcall_entry draw_single_run_seq[] = { { DRAW_LAST_KIND } }; -static const struct drawcall_entry draw_reordered_run_seq[] = { +static const struct drawcall_entry draw_ltr_reordered_run_seq[] = { { DRAW_GLYPHRUN, {'1','2','3','-','5','2',0}, {'r','u',0}, 6 }, - { DRAW_GLYPHRUN, {0x64a,0x64f,0x633,0x627,0x648,0x650,0x64a,0}, {'r','u',0}, 7 }, - { DRAW_GLYPHRUN, {'7','1',0}, {'r','u',0}, 2 }, + { DRAW_GLYPHRUN, {0x64a,0x64f,0x633,0x627,0x648,0x650,0x64a,0}, {'r','u',0}, 7, 1 }, + { DRAW_GLYPHRUN, {'7','1',0}, {'r','u',0}, 2, 2 }, { DRAW_GLYPHRUN, {'.',0}, {'r','u',0}, 1 }, { DRAW_LAST_KIND } }; +static const struct drawcall_entry draw_rtl_reordered_run_seq[] = { + { DRAW_GLYPHRUN, {'1','2','3','-','5','2',0}, {'r','u',0}, 6, 2 }, + { DRAW_GLYPHRUN, {0x64a,0x64f,0x633,0x627,0x648,0x650,0x64a,0}, {'r','u',0}, 7, 1 }, + { DRAW_GLYPHRUN, {'7','1',0}, {'r','u',0}, 2, 2 }, + { DRAW_GLYPHRUN, {'.',0}, {'r','u',0}, 1, 1 }, + { DRAW_LAST_KIND } +}; + static void test_Draw(void) { static const WCHAR str3W[] = {'1','2','3','-','5','2',0x64a,0x64f,0x633,0x627,0x648,0x650, @@ -1887,10 +1908,21 @@ todo_wine ctxt.use_gdi_natural = FALSE; ctxt.snapping_disabled = TRUE; + hr = IDWriteTextLayout_SetReadingDirection(layout, DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); + ok(hr == S_OK, "Failed to set reading direction, hr %#x.\n", hr); + + flush_sequence(sequences, RENDERER_ID); + hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0f, 0.0f); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok_sequence(sequences, RENDERER_ID, draw_ltr_reordered_run_seq, "draw test 11", FALSE); + + hr = IDWriteTextLayout_SetReadingDirection(layout, DWRITE_READING_DIRECTION_RIGHT_TO_LEFT); + ok(hr == S_OK, "Failed to set reading direction, hr %#x.\n", hr); + flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0f, 0.0f); ok(hr == S_OK, "got 0x%08x\n", hr); - ok_sequence(sequences, RENDERER_ID, draw_reordered_run_seq, "draw test 11", FALSE); + ok_sequence(sequences, RENDERER_ID, draw_rtl_reordered_run_seq, "draw test 12", FALSE); IDWriteTextLayout_Release(layout);
1
0
0
0
Nikolay Sivov : user32/tests: Fix Listbox test failures on some configurations.
by Alexandre Julliard
07 Nov '18
07 Nov '18
Module: wine Branch: master Commit: 54cd4464c68fca8639cda848c1ab43db39c380cc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54cd4464c68fca8639cda848…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 7 14:52:35 2018 +0300 user32/tests: Fix Listbox test failures on some configurations. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/listbox.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index dfa8de7..019d284 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -741,6 +741,7 @@ static void test_listbox_item_data(void) static void test_listbox_LB_DIR(void) { + char path[MAX_PATH], curdir[MAX_PATH]; HWND hList; int res, itemCount; int itemCount_justFiles; @@ -753,6 +754,16 @@ static void test_listbox_LB_DIR(void) char driveletter; const char *wildcard = "*"; HANDLE file; + BOOL ret; + + GetCurrentDirectoryA(ARRAY_SIZE(curdir), curdir); + + GetTempPathA(ARRAY_SIZE(path), path); + ret = SetCurrentDirectoryA(path); + ok(ret, "Failed to set current directory.\n"); + + ret = CreateDirectoryA("lb_dir_test", NULL); + ok(ret, "Failed to create test directory.\n"); file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); @@ -1084,11 +1095,11 @@ static void test_listbox_LB_DIR(void) itemCount, itemCount_allDirs); ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!\n"); - if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */ + if (itemCount) { memset(pathBuffer, 0, MAX_PATH); SendMessageA(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer); - ok( !strcmp(pathBuffer, "[..]"), "First element is not [..]\n"); + ok( !strcmp(pathBuffer, "[..]"), "First element is %s, not [..]\n", pathBuffer); } /* This tests behavior when no files match the wildcard */ @@ -1172,6 +1183,9 @@ static void test_listbox_LB_DIR(void) DestroyWindow(hList); DeleteFileA( "wtest1.tmp.c" ); + RemoveDirectoryA("lb_dir_test"); + + SetCurrentDirectoryA(curdir); } static HWND g_listBox;
1
0
0
0
← Newer
1
...
81
82
83
84
85
86
87
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200