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
April 2008
----- 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
4 participants
1278 discussions
Start a n
N
ew thread
Rob Shearman : widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 14dd441c5b6f2a4303ae128883469f4f09dbc32b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14dd441c5b6f2a4303ae12888…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:40 2008 +0100 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. --- tools/widl/parser.y | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 461483c..1732eae 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -287,8 +287,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %type <type> type %type <ifref> coclass_int %type <ifref_list> coclass_ints -%type <var> arg field s_field case enum constdef externdef -%type <var_list> m_args no_args args fields cases enums enum_list dispint_props +%type <var> arg field ne_union_field union_field s_field case enum constdef externdef +%type <var_list> m_args no_args args fields ne_union_fields cases enums enum_list dispint_props %type <var> m_ident t_ident ident %type <declarator> declarator func_declarator direct_declarator %type <declarator_list> declarator_list @@ -576,11 +576,11 @@ cases: { $$ = NULL; } | cases case { $$ = append_var( $1, $2 ); } ; -case: tCASE expr_const ':' field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); +case: tCASE expr_const ':' union_field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); $$ = $4; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } - | tDEFAULT ':' field { attr_t *a = make_attr(ATTR_DEFAULT); + | tDEFAULT ':' union_field { attr_t *a = make_attr(ATTR_DEFAULT); $$ = $3; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } @@ -707,10 +707,20 @@ fields: { $$ = NULL; } field: s_field ';' { $$ = $1; } | m_attributes uniondef ';' { $$ = make_var(NULL); $$->type = $2; $$->attrs = $1; } + ; + +ne_union_field: + s_field ';' { $$ = $1; } | attributes ';' { $$ = make_var(NULL); $$->attrs = $1; } - | ';' { $$ = NULL; } + +ne_union_fields: { $$ = NULL; } + | ne_union_fields ne_union_field { $$ = append_var( $1, $2 ); } ; +union_field: + s_field ';' { $$ = $1; } + | ';' { $$ = NULL; } + s_field: m_attributes type declarator { $$ = $3->var; $$->attrs = check_field_attrs($$->name, $1); set_type($$, $2, $3, FALSE); @@ -990,7 +1000,8 @@ typedef: tTYPEDEF m_attributes type declarator_list } ; -uniondef: tUNION t_ident '{' fields '}' { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); +uniondef: tUNION t_ident '{' ne_union_fields '}' + { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); $$->kind = TKIND_UNION; $$->fields_or_args = $4; $$->defined = TRUE;
1
0
0
0
Rob Shearman : widl: Consolidate most of the inner loop of reg_typedefs into set_type.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2f381f30a69beb2ff79deb7bdb685cd73e409fac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f381f30a69beb2ff79deb7bd…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:08 2008 +0100 widl: Consolidate most of the inner loop of reg_typedefs into set_type. --- tools/widl/parser.y | 40 ++++++++++------------------------------ 1 files changed, 10 insertions(+), 30 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index b4805ed..5545e7d 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1266,6 +1266,10 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); } + if (is_attr(v->attrs, ATTR_STRING) && !is_ptr(v->type) && !arr) + error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", + v->name); + sizeless = FALSE; if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) { @@ -1592,7 +1596,6 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a { const pident_t *pident; int is_str = is_attr(attrs, ATTR_STRING); - unsigned char ptr_type = get_attrv(attrs, ATTR_POINTERTYPE); if (is_str) { @@ -1628,36 +1631,13 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a var_t *name = pident->var; if (name->name) { - type_t *cur = append_ptrchain_type(pident->type, type); - if (pident->func_type) - { - type_t *t; - type_t *return_type = cur; - cur = pident->func_type; - for (t = cur; is_ptr(t); t = t->ref) - ; - assert(t->type == RPC_FC_FUNCTION); - t->ref = return_type; - if (is_object_interface && !is_attr(t->attrs, ATTR_CALLCONV)) - { - static char *stdmethodcalltype; - if (!stdmethodcalltype) stdmethodcalltype = strdup("STDMETHODCALLTYPE"); - t->attrs = append_attr(NULL, make_attrp(ATTR_CALLCONV, stdmethodcalltype)); - } - } - cur = alias(cur, name->name); + type_t *cur; + + /* set the attributes to allow set_type to do some checks on them */ + name->attrs = attrs; + set_type(name, type, pident, NULL, 0); + cur = alias(name->type, name->name); cur->attrs = attrs; - if (ptr_type) - { - if (is_ptr(cur)) - cur->type = ptr_type; - else - error_loc("'%s': pointer attribute applied to non-pointer type\n", - cur->name); - } - else if (is_str && ! is_ptr(cur)) - error_loc("'%s': [string] attribute applied to non-pointer type\n", - cur->name); if (is_incomplete(cur)) add_incomplete(cur);
1
0
0
0
Alexandre Julliard : oleaut32/tests: Store the test typelib in resources instead of depending on an external file .
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: c76de89885c4c8cd97204d5e09b22ca0e3588b02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c76de89885c4c8cd97204d5e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 25 12:09:03 2008 +0200 oleaut32/tests: Store the test typelib in resources instead of depending on an external file. --- dlls/oleaut32/tests/tmarshal.rc | 3 +++ dlls/oleaut32/tests/typelib.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.rc b/dlls/oleaut32/tests/tmarshal.rc index 30c2a9b..707895f 100644 --- a/dlls/oleaut32/tests/tmarshal.rc +++ b/dlls/oleaut32/tests/tmarshal.rc @@ -29,3 +29,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: tmarshal.tlb */ 1 TYPELIB LOADONCALL DISCARDABLE tmarshal.tlb + +/* @makedep: test_tlb.tlb */ +2 TYPELIB LOADONCALL DISCARDABLE test_tlb.tlb diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a30b275..74a7812 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1337,13 +1337,41 @@ static void test_dump_typelib(const char *name) #endif +static const char *create_test_typelib(void) +{ + static char filename[MAX_PATH]; + HANDLE file; + HRSRC res; + void *ptr; + DWORD written; + + GetTempFileNameA( ".", "tlb", 0, filename ); + file = CreateFile( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" ); + if (file == INVALID_HANDLE_VALUE) return NULL; + res = FindResource( GetModuleHandle(0), MAKEINTRESOURCE(2), "TYPELIB" ); + ok( res != 0, "couldn't find resource\n" ); + ptr = LockResource( LoadResource( GetModuleHandle(0), res )); + WriteFile( file, ptr, SizeofResource( GetModuleHandle(0), res ), &written, NULL ); + ok( written == SizeofResource( GetModuleHandle(0), res ), "couldn't write resource\n" ); + CloseHandle( file ); + return filename; +} + START_TEST(typelib) { + const char *filename; + ref_count_test(wszStdOle2); test_TypeComp(); test_CreateDispTypeInfo(); test_TypeInfo(); test_QueryPathOfRegTypeLib(); test_inheritance(); - test_dump_typelib("test_tlb.tlb"); + + if ((filename = create_test_typelib())) + { + test_dump_typelib( filename ); + DeleteFile( filename ); + } }
1
0
0
0
Eric Pouech : richedit: Ensure wrapping is done all the time after inserting an RTF stream.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 046cfcfd22c8ff7abdbbf7694add3089f6b5d899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=046cfcfd22c8ff7abdbbf7694…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:36 2008 +0200 richedit: Ensure wrapping is done all the time after inserting an RTF stream. --- dlls/riched20/editor.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e635e9f..dcb21d1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1140,10 +1140,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_ReleaseStyle(style); editor->nEventMask = nEventMask; - if (editor->bRedraw) - { - ME_UpdateRepaint(editor); - } + ME_UpdateRepaint(editor); if (!(format & SFF_SELECTION)) { ME_ClearTempStyle(editor); }
1
0
0
0
Eric Pouech : richedit: Properly handle the background in case of border in paragraph.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 60234f8fc4b1b50b3f3dfd7e27b2973746008ef6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60234f8fc4b1b50b3f3dfd7e2…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:26 2008 +0200 richedit: Properly handle the background in case of border in paragraph. --- dlls/riched20/paint.c | 114 +++++++++++++++++++++++++++++-------------------- 1 files changed, 67 insertions(+), 47 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index ddd7de7..2ec7fb9 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -373,47 +373,51 @@ int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para) return sp * c->editor->nZoomNumerator / c->editor->nZoomDenominator; } -static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) +static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT* bounds) { - int idx, border_width; - int ybefore, yafter; + int idx, border_width, top_border, bottom_border; RECT rc; - if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return 0; + SetRectEmpty(bounds); + if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return; + + border_width = top_border = bottom_border = 0; + idx = (para->pFmt->wBorders >> 8) & 0xF; + if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) + { + if (para->pFmt->wBorders & 0x00B0) + FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); + border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); + if (para->pFmt->wBorders & 4) top_border = border_width; + if (para->pFmt->wBorders & 8) bottom_border = border_width; + } if (para->pFmt->dwMask & PFM_SPACEBEFORE) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.top = y; - ybefore = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); - rc.bottom = y + ybefore; + bounds->top = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); + rc.bottom = y + bounds->top + top_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else ybefore = 0; + if (para->pFmt->dwMask & PFM_SPACEAFTER) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.bottom = y + para->nHeight; - yafter = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); - rc.top = rc.bottom - yafter; + bounds->bottom = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); + rc.top = rc.bottom - bounds->bottom - bottom_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else yafter = 0; - border_width = 0; - idx = (para->pFmt->wBorders >> 8) & 0xF; if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) { int pen_width; COLORREF pencr; HPEN pen = NULL, oldpen = NULL; POINT pt; - if (para->pFmt->wBorders & 0x00B0) - FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); - border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); - if (para->pFmt->wBorders & 64) /* autocolor */ pencr = GetSysColor(COLOR_WINDOWTEXT); else @@ -425,50 +429,66 @@ static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) MoveToEx(c->hDC, 0, 0, &pt); /* before & after spaces are not included in border */ + + /* helper to draw the double lines in case of corner */ +#define DD(x) ((para->pFmt->wBorders & (x)) ? (pen_width + 1) : 0) + if (para->pFmt->wBorders & 1) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.left, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.left + 1; + rc.right = rc.left + border_width; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->left += border_width; } if (para->pFmt->wBorders & 2) { - MoveToEx(c->hDC, c->rcView.right, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.right - 1, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right - 1, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.right - pen_width - 1; + rc.right = c->rcView.right - 1; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.right - 1 - pen_width - 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.right - 1 - pen_width - 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->right += border_width; } if (para->pFmt->wBorders & 4) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + ybefore); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right, y + bounds->top); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + bounds->top + pen_width + 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + bounds->top + pen_width + 1); } + bounds->top += border_width; } if (para->pFmt->wBorders & 8) { - MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - yafter - 1, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter - 1); + MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom - 1, NULL); + LineTo(c->hDC, c->rcView.right, y + para->nHeight - bounds->bottom - 1); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - 1 - pen_width - 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - 1 - pen_width - 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + para->nHeight - bounds->bottom - 1 - pen_width - 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + para->nHeight - bounds->bottom - 1 - pen_width - 1); } + bounds->bottom += border_width; } +#undef DD MoveToEx(c->hDC, pt.x, pt.y, NULL); SelectObject(c->hDC, oldpen); DeleteObject(pen); } - return ybefore + - ((para->pFmt->dwMask & PFM_BORDER) && (para->pFmt->wBorders & 4) ? - border_width : 0); } void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { @@ -476,12 +496,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { ME_DisplayItem *p; ME_Run *run; ME_Paragraph *para = NULL; - RECT rc, rcPara; + RECT rc, rcPara, bounds; int y = c->pt.y; int height = 0, baseline = 0, no=0, pno = 0; - int xe = 0; + int xs = 0, xe = 0; BOOL visible = FALSE; - int nMargWidth = 0; c->pt.x = c->rcView.left; rcPara.left = c->rcView.left; @@ -491,11 +510,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { case diParagraph: para = &p->member.para; assert(para); - nMargWidth = ME_twips2pointsX(c, para->pFmt->dxStartIndent); - if (pno != 0) - nMargWidth += ME_twips2pointsX(c, para->pFmt->dxOffset); + pno = 0; + xs = c->rcView.left + ME_twips2pointsX(c, para->pFmt->dxStartIndent); xe = c->rcView.right - ME_twips2pointsX(c, para->pFmt->dxRightIndent); - y += ME_DrawParaDecoration(c, para, y); + ME_DrawParaDecoration(c, para, y, &bounds); + y += bounds.top; break; case diStartRow: y += height; @@ -504,16 +523,16 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { visible = RectVisible(c->hDC, &rcPara); if (visible) { /* left margin */ - rc.left = c->rcView.left; - rc.right = c->rcView.left+nMargWidth; + rc.left = c->rcView.left + bounds.left; + rc.right = xs; rc.top = y; rc.bottom = y+p->member.row.nHeight; FillRect(c->hDC, &rc, c->editor->hbrBackground); /* right margin */ rc.left = xe; - rc.right = c->rcView.right; + rc.right = c->rcView.right - bounds.right; FillRect(c->hDC, &rc, c->editor->hbrBackground); - rc.left = c->rcView.left+nMargWidth; + rc.left = xs; rc.right = xe; FillRect(c->hDC, &rc, c->editor->hbrBackground); } @@ -529,7 +548,8 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { height = p->member.row.nHeight; baseline = p->member.row.nBaseline; - pno++; + if (!pno++) + xe += ME_twips2pointsX(c, para->pFmt->dxOffset); break; case diRun: assert(para);
1
0
0
0
John Klehm : winex11: Add support for IsXExtensionPointer tablet devices.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2c26ea609d6b2b8a25be20984c0014ceb202466a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c26ea609d6b2b8a25be20984…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Tue Apr 22 20:11:28 2008 -0500 winex11: Add support for IsXExtensionPointer tablet devices. --- dlls/winex11.drv/wintab.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 37596ba..b086e44 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -530,14 +530,15 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) devices[loop].use == IsXKeyboard ? "IsXKeyboard" : devices[loop].use == IsXPointer ? "IsXPointer" : devices[loop].use == IsXExtensionDevice ? "IsXExtensionDevice" : + devices[loop].use == IsXExtensionPointer ? "IsXExtensionPointer" : "Unknown" ); - if (devices[loop].use == IsXExtensionDevice) + if ((devices[loop].use == IsXExtensionDevice) || (devices[loop].use == IsXExtensionPointer)) { LPWTI_CURSORS_INFO cursor; - TRACE("Is Extension Device\n"); + TRACE("Is XExtension%s\n", (devices[loop].use == IsXExtensionDevice)? "Device":"Pointer"); cursor_target++; target = &devices[loop]; cursor = &gSysCursor[cursor_target];
1
0
0
0
John Klehm : winex11: Allow wizardpen to be detected as a stylus.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 33d4117e1b988edbe0f7fa09817d97dcd920117d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33d4117e1b988edbe0f7fa098…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Thu Apr 17 09:48:50 2008 -0500 winex11: Allow wizardpen to be detected as a stylus. --- dlls/winex11.drv/wintab.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 8a2afd1..37596ba 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -414,10 +414,20 @@ static BOOL is_tablet_cursor(const char *name, const char *type) static BOOL is_stylus(const char *name, const char *type) { - if (name && match_token(name, "stylus")) - return TRUE; - if (type && match_token(type, "stylus")) - return TRUE; + int i; + static const char* tablet_stylus_whitelist[] = { + "stylus", + "wizardpen", + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + return FALSE; }
1
0
0
0
John Klehm : winex11: Allow wintab devices with less than 5 axes.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: b95c091dbf7669361a3f720083cac52989866b0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b95c091dbf7669361a3f72008…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Wed Apr 16 02:26:37 2008 -0500 winex11: Allow wintab devices with less than 5 axes. --- dlls/winex11.drv/wintab.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 16e369b..8a2afd1 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -620,7 +620,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) ** the various inputs to see what the values are. Odds are that a ** more 'correct' algorithm would condense to this one anyway. */ - if (!axis_read_complete && Val->num_axes >= 5 && cursor->TYPE == CSR_TYPE_PEN) + if (!axis_read_complete && cursor->TYPE == CSR_TYPE_PEN) { Axis = (XAxisInfoPtr) ((char *) Val + sizeof (XValuatorInfo));
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 8cf5608089ad40f842ff8d518f428efebc95c517 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8cf5608089ad40f842ff8d518…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:36 2008 +0400 gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/graphics.c | 27 ++++++++++++++++++++++++++- include/gdiplusflat.h | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 9fdd4be..bdead36 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -181,8 +181,8 @@ @ stub GdipDrawImagePointsI @ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr) @ stub GdipDrawImagePointsRectI -@ stub GdipDrawImageRect -@ stub GdipDrawImageRectI +@ stdcall GdipDrawImageRect(ptr ptr long long long long) +@ stdcall GdipDrawImageRectI(ptr ptr long long long long) @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawImageRectRectI(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawLine(ptr ptr long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index ef57def..b8a2efa 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1100,7 +1100,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); - if(!graphics || !image || !points || !imageAttributes || count != 3) + if(!graphics || !image || !points || count != 3) return InvalidParameter; if(srcUnit == UnitInch) @@ -1177,6 +1177,31 @@ GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); } +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics *graphics, GpImage *image, + REAL x, REAL y, REAL width, REAL height) +{ + RectF bounds; + GpUnit unit; + GpStatus ret; + + if(!graphics || !image) + return InvalidParameter; + + ret = GdipGetImageBounds(image, &bounds, &unit); + if(ret != Ok) + return ret; + + return GdipDrawImageRectRect(graphics, image, x, y, width, height, + bounds.X, bounds.Y, bounds.Width, bounds.Height, + unit, NULL, NULL, NULL); +} + +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, + INT x, INT y, INT width, INT height) +{ + return GdipDrawImageRect(graphics, image, (REAL)x, (REAL)y, (REAL)width, (REAL)height); +} + GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, REAL x2, REAL y2) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index cd349ea..8df6c5b 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -87,6 +87,8 @@ GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL, GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT, INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort, VOID*); +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipAddPathBezier.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 19cc99c33387a3f0d7de208f6586ebac1081a61f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19cc99c33387a3f0d7de208f6…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:26 2008 +0400 gdiplus: Implemented GdipAddPathBezier. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 27 +++++++++++++++++---------- include/gdiplusflat.h | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 3905c74..9fdd4be 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -1,6 +1,6 @@ @ stdcall GdipAddPathArc(ptr long long long long long long) @ stdcall GdipAddPathArcI(ptr long long long long long long) -@ stub GdipAddPathBezier +@ stdcall GdipAddPathBezier(ptr long long long long long long long long) @ stdcall GdipAddPathBezierI(ptr long long long long long long long long) @ stdcall GdipAddPathBeziers(ptr ptr long) @ stub GdipAddPathBeziersI diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index d7be43e..3f83bea 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -103,8 +103,8 @@ GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x1, INT y1, INT x2, return GdipAddPathArc(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,startAngle,sweepAngle); } -GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, - INT y2, INT x3, INT y3, INT x4, INT y4) +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, + REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { INT old_count; @@ -116,14 +116,14 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, old_count = path->pathdata.Count; - path->pathdata.Points[old_count].X = (REAL) x1; - path->pathdata.Points[old_count].Y = (REAL) y1; - path->pathdata.Points[old_count + 1].X = (REAL) x2; - path->pathdata.Points[old_count + 1].Y = (REAL) y2; - path->pathdata.Points[old_count + 2].X = (REAL) x3; - path->pathdata.Points[old_count + 2].Y = (REAL) y3; - path->pathdata.Points[old_count + 3].X = (REAL) x4; - path->pathdata.Points[old_count + 3].Y = (REAL) y4; + path->pathdata.Points[old_count].X = x1; + path->pathdata.Points[old_count].Y = y1; + path->pathdata.Points[old_count + 1].X = x2; + path->pathdata.Points[old_count + 1].Y = y2; + path->pathdata.Points[old_count + 2].X = x3; + path->pathdata.Points[old_count + 2].Y = y3; + path->pathdata.Points[old_count + 3].X = x4; + path->pathdata.Points[old_count + 3].Y = y4; path->pathdata.Types[old_count] = (path->newfigure ? PathPointTypeStart : PathPointTypeLine); @@ -137,6 +137,13 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, + INT y2, INT x3, INT y3, INT x4, INT y4) +{ + return GdipAddPathBezier(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,(REAL)x3,(REAL)y3, + (REAL)x4,(REAL)y4); +} + GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 366e8a5..cd349ea 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -189,6 +189,7 @@ GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
128
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200