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
March 2013
----- 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
531 discussions
Start a n
N
ew thread
Alexandre Julliard : msvcrt: Export the float math functions on ARM.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 599d080220bd40a8a076a2a08cb08e64b87f54c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=599d080220bd40a8a076a2a08…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 14 13:06:25 2013 +0100 msvcrt: Export the float math functions on ARM. --- dlls/msvcrt/math.c | 2 +- dlls/msvcrt/msvcrt.spec | 54 +++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 4570da0..a55ecb6 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -68,7 +68,7 @@ int CDECL MSVCRT__set_SSE2_enable(int flag) return sse2_enabled; } -#ifdef __x86_64__ +#if defined(__x86_64__) || defined(__arm__) /********************************************************************* * _chgsignf (MSVCRT.@) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 0bf5ab2..d5cc428 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -351,7 +351,7 @@ @ cdecl _chdir(str) MSVCRT__chdir @ cdecl _chdrive(long) MSVCRT__chdrive @ cdecl _chgsign(double) MSVCRT__chgsign -@ cdecl -arch=x86_64 _chgsignf(float) MSVCRT__chgsignf +@ cdecl -arch=arm,x86_64 _chgsignf(float) MSVCRT__chgsignf @ cdecl -i386 -norelay _chkesp() @ cdecl _chmod(str long) MSVCRT__chmod @ cdecl _chsize(long long) MSVCRT__chsize @@ -366,7 +366,7 @@ @ cdecl _controlfp(long long) @ cdecl _controlfp_s(ptr long long) @ cdecl _copysign(double double) MSVCRT__copysign -@ cdecl -arch=x86_64 _copysignf(float float) MSVCRT__copysignf +@ cdecl -arch=arm,x86_64 _copysignf(float float) MSVCRT__copysignf @ varargs _cprintf(str) # stub _cprintf_l(str ptr) # stub _cprintf_p(str) @@ -449,7 +449,7 @@ @ cdecl _findnext64i32(long ptr) MSVCRT__findnext64i32 @ cdecl _findnexti64(long ptr) MSVCRT__findnexti64 @ cdecl _finite(double) MSVCRT__finite -@ cdecl -arch=x86_64 _finitef(float) MSVCRT__finitef +@ cdecl -arch=arm,x86_64 _finitef(float) MSVCRT__finitef @ cdecl _flsbuf(long ptr) MSVCRT__flsbuf @ cdecl _flushall() MSVCRT__flushall @ extern _fmode MSVCRT__fmode @@ -625,7 +625,7 @@ @ cdecl _ismbstrail(ptr ptr) # stub _ismbstrail_l(long ptr) @ cdecl _isnan(double) MSVCRT__isnan -@ cdecl -arch=x86_64 _isnanf(float) MSVCRT__isnanf +@ cdecl -arch=arm,x86_64 _isnanf(float) MSVCRT__isnanf @ cdecl _isprint_l(long ptr) MSVCRT__isprint_l @ cdecl _isspace_l(long ptr) MSVCRT__isspace_l @ cdecl _isupper_l(long ptr) MSVCRT__isupper_l @@ -664,7 +664,7 @@ @ cdecl _lock_file(ptr) MSVCRT__lock_file @ cdecl _locking(long long long) MSVCRT__locking @ cdecl _logb(double) MSVCRT__logb -@ cdecl -arch=x86_64 _logbf(float) MSVCRT__logbf +@ cdecl -arch=arm,x86_64 _logbf(float) MSVCRT__logbf @ cdecl -i386 _longjmpex(ptr long) MSVCRT_longjmp @ cdecl _lrotl(long long) MSVCRT__lrotl @ cdecl _lrotr(long long) MSVCRT__lrotr @@ -834,7 +834,7 @@ # stub -arch=win32 _msize_debug(ptr long) # stub -arch=win64 _msize_dbg(ptr long) @ cdecl _nextafter(double double) MSVCRT__nextafter -@ cdecl -arch=x86_64 _nextafterf(float float) MSVCRT__nextafterf +@ cdecl -arch=arm,x86_64 _nextafterf(float float) MSVCRT__nextafterf @ cdecl _onexit(ptr) MSVCRT__onexit @ varargs _open(str long) MSVCRT__open @ cdecl _open_osfhandle(long long) MSVCRT__open_osfhandle @@ -874,7 +874,7 @@ @ cdecl -arch=i386 _safe_fprem() @ cdecl -arch=i386 _safe_fprem1() @ cdecl _scalb(double long) MSVCRT__scalb -@ cdecl -arch=x86_64 _scalbf(float long) MSVCRT__scalbf +@ cdecl -arch=arm,x86_64 _scalbf(float long) MSVCRT__scalbf @ varargs _scanf_l(str ptr) MSVCRT__scanf_l @ varargs _scanf_s_l(str ptr) MSVCRT__scanf_s_l @ varargs _scprintf(str) MSVCRT__scprintf @@ -1238,15 +1238,15 @@ @ cdecl abort() MSVCRT_abort @ cdecl abs(long) MSVCRT_abs @ cdecl acos(double) MSVCRT_acos -@ cdecl -arch=x86_64 acosf(float) MSVCRT_acosf +@ cdecl -arch=arm,x86_64 acosf(float) MSVCRT_acosf @ cdecl asctime(ptr) MSVCRT_asctime @ cdecl asctime_s(ptr long ptr) MSVCRT_asctime_s @ cdecl asin(double) MSVCRT_asin @ cdecl atan(double) MSVCRT_atan @ cdecl atan2(double double) MSVCRT_atan2 -@ cdecl -arch=x86_64 asinf(float) MSVCRT_asinf -@ cdecl -arch=x86_64 atanf(float) MSVCRT_atanf -@ cdecl -arch=x86_64 atan2f(float float) MSVCRT_atan2f +@ cdecl -arch=arm,x86_64 asinf(float) MSVCRT_asinf +@ cdecl -arch=arm,x86_64 atanf(float) MSVCRT_atanf +@ cdecl -arch=arm,x86_64 atan2f(float float) MSVCRT_atan2f @ cdecl atexit(ptr) MSVCRT_atexit @ cdecl atof(str) MSVCRT_atof @ cdecl atoi(str) ntdll.atoi @@ -1256,20 +1256,20 @@ @ cdecl btowc(long) MSVCRT_btowc @ cdecl calloc(long long) MSVCRT_calloc @ cdecl ceil(double) MSVCRT_ceil -@ cdecl -arch=x86_64 ceilf(float) MSVCRT_ceilf +@ cdecl -arch=arm,x86_64 ceilf(float) MSVCRT_ceilf @ cdecl clearerr(ptr) MSVCRT_clearerr # stub clearerr_s(ptr) @ cdecl clock() MSVCRT_clock @ cdecl cos(double) MSVCRT_cos @ cdecl cosh(double) MSVCRT_cosh -@ cdecl -arch=x86_64 cosf(float) MSVCRT_cosf -@ cdecl -arch=x86_64 coshf(float) MSVCRT_coshf +@ cdecl -arch=arm,x86_64 cosf(float) MSVCRT_cosf +@ cdecl -arch=arm,x86_64 coshf(float) MSVCRT_coshf @ cdecl ctime(ptr) MSVCRT_ctime @ cdecl difftime(long long) MSVCRT_difftime @ cdecl -ret64 div(long long) MSVCRT_div @ cdecl exit(long) MSVCRT_exit @ cdecl exp(double) MSVCRT_exp -@ cdecl -arch=x86_64 expf(float) MSVCRT_expf +@ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf @ cdecl fabs(double) MSVCRT_fabs @ cdecl fclose(ptr) MSVCRT_fclose @ cdecl feof(ptr) MSVCRT_feof @@ -1281,9 +1281,9 @@ @ cdecl fgetwc(ptr) MSVCRT_fgetwc @ cdecl fgetws(ptr long ptr) MSVCRT_fgetws @ cdecl floor(double) MSVCRT_floor -@ cdecl -arch=x86_64 floorf(float) MSVCRT_floorf +@ cdecl -arch=arm,x86_64 floorf(float) MSVCRT_floorf @ cdecl fmod(double double) MSVCRT_fmod -@ cdecl -arch=x86_64 fmodf(float float) MSVCRT_fmodf +@ cdecl -arch=arm,x86_64 fmodf(float float) MSVCRT_fmodf @ cdecl fopen(str str) MSVCRT_fopen @ cdecl fopen_s(ptr str str) MSVCRT_fopen_s @ varargs fprintf(ptr str) MSVCRT_fprintf @@ -1297,7 +1297,7 @@ @ cdecl freopen(str str ptr) MSVCRT_freopen @ cdecl freopen_s(ptr str str ptr) MSVCRT_freopen_s @ cdecl frexp(double ptr) MSVCRT_frexp -@ cdecl -arch=x86_64 frexpf(float ptr) MSVCRT_frexpf +@ cdecl -arch=arm,x86_64 frexpf(float ptr) MSVCRT_frexpf @ varargs fscanf(ptr str) MSVCRT_fscanf @ varargs fscanf_s(ptr str) MSVCRT_fscanf_s @ cdecl fseek(ptr long long) MSVCRT_fseek @@ -1349,8 +1349,8 @@ @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log @ cdecl log10(double) MSVCRT_log10 -@ cdecl -arch=x86_64 logf(float) MSVCRT_logf -@ cdecl -arch=x86_64 log10f(float) MSVCRT_log10f +@ cdecl -arch=arm,x86_64 logf(float) MSVCRT_logf +@ cdecl -arch=arm,x86_64 log10f(float) MSVCRT_log10f @ cdecl -arch=i386,x86_64,arm longjmp(ptr long) MSVCRT_longjmp @ cdecl malloc(long) MSVCRT_malloc @ cdecl mblen(ptr long) MSVCRT_mblen @@ -1371,10 +1371,10 @@ @ cdecl memset(ptr long long) ntdll.memset @ cdecl mktime(ptr) MSVCRT_mktime @ cdecl modf(double ptr) MSVCRT_modf -@ cdecl -arch=x86_64 modff(float ptr) MSVCRT_modff +@ cdecl -arch=arm,x86_64 modff(float ptr) MSVCRT_modff @ cdecl perror(str) MSVCRT_perror @ cdecl pow(double double) MSVCRT_pow -@ cdecl -arch=x86_64 powf(float float) MSVCRT_powf +@ cdecl -arch=arm,x86_64 powf(float float) MSVCRT_powf @ varargs printf(str) MSVCRT_printf @ varargs printf_s(str) MSVCRT_printf_s @ cdecl putc(long ptr) MSVCRT_putc @@ -1400,12 +1400,12 @@ @ cdecl signal(long long) MSVCRT_signal @ cdecl sin(double) MSVCRT_sin @ cdecl sinh(double) MSVCRT_sinh -@ cdecl -arch=x86_64 sinf(float) MSVCRT_sinf -@ cdecl -arch=x86_64 sinhf(float) MSVCRT_sinhf +@ cdecl -arch=arm,x86_64 sinf(float) MSVCRT_sinf +@ cdecl -arch=arm,x86_64 sinhf(float) MSVCRT_sinhf @ varargs sprintf(ptr str) MSVCRT_sprintf @ varargs sprintf_s(ptr long str) MSVCRT_sprintf_s @ cdecl sqrt(double) MSVCRT_sqrt -@ cdecl -arch=x86_64 sqrtf(float) MSVCRT_sqrtf +@ cdecl -arch=arm,x86_64 sqrtf(float) MSVCRT_sqrtf @ cdecl srand(long) MSVCRT_srand @ varargs sscanf(str str) MSVCRT_sscanf @ varargs sscanf_s(str str) MSVCRT_sscanf_s @@ -1444,8 +1444,8 @@ @ cdecl system(str) MSVCRT_system @ cdecl tan(double) MSVCRT_tan @ cdecl tanh(double) MSVCRT_tanh -@ cdecl -arch=x86_64 tanf(float) MSVCRT_tanf -@ cdecl -arch=x86_64 tanhf(float) MSVCRT_tanhf +@ cdecl -arch=arm,x86_64 tanf(float) MSVCRT_tanf +@ cdecl -arch=arm,x86_64 tanhf(float) MSVCRT_tanhf @ cdecl time(ptr) MSVCRT_time @ cdecl tmpfile() MSVCRT_tmpfile @ cdecl tmpfile_s(ptr) MSVCRT_tmpfile_s
1
0
0
0
Alexandre Julliard : msvcrt: Export the ARM version of some mangled names.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 5c4bce668ca0290db6ed89ca8d7eb854f4377214 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c4bce668ca0290db6ed89ca8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 14 12:41:47 2013 +0100 msvcrt: Export the ARM version of some mangled names. --- dlls/msvcr100/msvcr100.spec | 3 +- dlls/msvcr110/msvcr110.spec | 54 +++++++++++++++--------------- dlls/msvcrt/msvcrt.spec | 78 ++++++++++++++++++++++++++++-------------- 3 files changed, 81 insertions(+), 54 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5c4bce668ca0290db6ed8…
1
0
0
0
André Hentschel : msvcrt: Add setjmp for ARM in spec file.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: b29e56f205727d0f9f79636e1e50efeb47527376 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b29e56f205727d0f9f79636e1…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Mar 13 20:06:44 2013 +0100 msvcrt: Add setjmp for ARM in spec file. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 019a41a..b558b06 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1769,7 +1769,7 @@ @ varargs scanf(str) msvcrt.scanf @ varargs scanf_s(str) msvcrt.scanf_s @ cdecl setbuf(ptr ptr) msvcrt.setbuf -@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp +@ cdecl -arch=arm,x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp @ cdecl setlocale(long str) msvcrt.setlocale @ cdecl setvbuf(ptr str long long) msvcrt.setvbuf @ cdecl signal(long long) msvcrt.signal diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 720c056..209cc80 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1422,7 +1422,7 @@ @ varargs scanf(str) msvcrt.scanf @ varargs scanf_s(str) msvcrt.scanf_s @ cdecl setbuf(ptr ptr) msvcrt.setbuf -@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp +@ cdecl -arch=arm,x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp @ cdecl setlocale(long str) msvcrt.setlocale @ cdecl setvbuf(ptr str long long) msvcrt.setvbuf @ cdecl signal(long long) msvcrt.signal diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 2b01fc3..8e5cc9b 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1368,7 +1368,7 @@ @ varargs scanf(str) MSVCRT_scanf @ varargs scanf_s(str) MSVCRT_scanf_s @ cdecl setbuf(ptr ptr) MSVCRT_setbuf -@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) MSVCRT__setjmp +@ cdecl -arch=arm,x86_64 -norelay -private setjmp(ptr) MSVCRT__setjmp @ cdecl setlocale(long str) MSVCRT_setlocale @ cdecl setvbuf(ptr str long long) MSVCRT_setvbuf @ cdecl signal(long long) MSVCRT_signal
1
0
0
0
Dmitry Timoshkov : gdiplus: Add more GdipMeasureString/ GdipMeasureCharacterRanges clipping and alignment tests.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 4b19b618f5e202ed8a0ea121869a3bb3a2d2f20f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b19b618f5e202ed8a0ea1218…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Mar 14 16:35:11 2013 +0900 gdiplus: Add more GdipMeasureString/GdipMeasureCharacterRanges clipping and alignment tests. --- dlls/gdiplus/tests/graphics.c | 201 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 193 insertions(+), 8 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index e41751a..fe525b6 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3909,7 +3909,7 @@ static void test_measure_string(void) static const WCHAR string[] = { 'A','0','1',0 }; HDC hdc; GpStringFormat *format; - CharacterRange range = { 0, 3 }; + CharacterRange range; GpRegion *region; GpGraphics *graphics; GpFontFamily *family; @@ -3923,8 +3923,7 @@ static void test_measure_string(void) status = GdipCreateStringFormat(StringFormatFlagsNoWrap, LANG_NEUTRAL, &format); expect(Ok, status); expect(Ok, status); - status = GdipSetStringFormatMeasurableCharacterRanges(format, 1, &range); - expect(Ok, status); + status = GdipCreateRegion(®ion); expect(Ok, status); @@ -3964,8 +3963,123 @@ static void test_measure_string(void) todo_wine expectf(height / 2.0, bounds.Height); + range.First = 0; + range.Length = lstrlenW(string); + status = GdipSetStringFormatMeasurableCharacterRanges(format, 1, &range); + expect(Ok, status); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 32000.0; + rect.Height = 32000.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); + expectf_(5.0 + margin_x, bounds.X, 1.0); + expectf(5.0, bounds.Y); + expectf_(width - margin_x*2.0, bounds.Width, 1.0); +todo_wine + expectf_(height - margin_y, bounds.Height, 1.0); + + width_rgn = bounds.Width; + height_rgn = bounds.Height; + + range.First = 0; + range.Length = 1; + status = GdipSetStringFormatMeasurableCharacterRanges(format, 1, &range); + expect(Ok, status); + + set_rect_empty(&rect); + rect.Width = 32000.0; + rect.Height = 32000.0; + status = GdipMeasureCharacterRanges(graphics, string, 1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); + expectf_(margin_x, bounds.X, 1.0); + expectf(0.0, bounds.Y); + ok(bounds.Width < width_rgn / 2.0, "width of 1 glyph is wrong\n"); + expectf(height_rgn, bounds.Height); + width_1 = bounds.Width; + + range.First = 0; + range.Length = lstrlenW(string); + status = GdipSetStringFormatMeasurableCharacterRanges(format, 1, &range); + expect(Ok, status); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(0.0, bounds.Width); + expectf(0.0, bounds.Height); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = width_rgn / 2.0; + rect.Height = 32000.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); +todo_wine + expectf_(5.0 + margin_x, bounds.X, 1.0); +todo_wine + expectf(5.0, bounds.Y); +todo_wine + expectf_(width_1, bounds.Width, 1.0); +todo_wine + expectf_(height - margin_y, bounds.Height, 1.0); + status = GdipSetStringFormatFlags(format, StringFormatFlagsNoWrap | StringFormatFlagsNoClip); + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); +todo_wine + expectf_(5.0 + margin_x, bounds.X, 1.0); +todo_wine + expectf(5.0, bounds.Y); +todo_wine + expectf(width_rgn, bounds.Width); +todo_wine + expectf(height_rgn, bounds.Height); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = width_rgn / 2.0; + rect.Height = 32000.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); +todo_wine + expectf_(5.0 + margin_x, bounds.X, 1.0); +todo_wine + expectf(5.0, bounds.Y); +todo_wine + expectf_(width_1, bounds.Width, 1.0); +todo_wine + expectf(height_rgn, bounds.Height); + set_rect_empty(&rect); rect.Height = height / 2.0; set_rect_empty(&bounds); @@ -3975,7 +4089,7 @@ todo_wine expect(1, lines); expectf(0.0, bounds.X); expectf(0.0, bounds.Y); - expectf(width, bounds.Width); + expectf_(width, bounds.Width, 0.01); todo_wine expectf(height, bounds.Height); @@ -4042,6 +4156,7 @@ todo_wine expectf_(width_1, bounds.Width, 0.01); expectf(height, bounds.Height); + /* Default (Near) alignment */ rect.X = 5.0; rect.Y = 5.0; rect.Width = width * 2.0; @@ -4053,7 +4168,7 @@ todo_wine expect(1, lines); expectf(5.0, bounds.X); expectf(5.0, bounds.Y); - expectf(width, bounds.Width); + expectf_(width, bounds.Width, 0.01); expectf(height, bounds.Height); rect.X = 5.0; @@ -4074,6 +4189,7 @@ todo_wine width_rgn = bounds.Width; height_rgn = bounds.Height; + /* Center alignment */ GdipSetStringFormatAlign(format, StringAlignmentCenter); GdipSetStringFormatLineAlign(format, StringAlignmentCenter); @@ -4090,7 +4206,23 @@ todo_wine expectf_(5.0 + width/2.0, bounds.X, 0.01); todo_wine expectf(5.0 + height/2.0, bounds.Y); - expectf(width, bounds.Width); + expectf_(width, bounds.Width, 0.01); + expectf(height, bounds.Height); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines); + expect(Ok, status); + expect(3, glyphs); + expect(1, lines); +todo_wine + expectf_(5.0 - width/2.0, bounds.X, 0.01); +todo_wine + expectf(5.0 - height/2.0, bounds.Y); + expectf_(width, bounds.Width, 0.01); expectf(height, bounds.Height); rect.X = 5.0; @@ -4108,6 +4240,25 @@ todo_wine expectf_(width_rgn, bounds.Width, 1.0); expectf_(height_rgn, bounds.Height, 1.0); + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); +todo_wine + expectf_(5.0 - width_rgn/2.0, bounds.X, 1.0); +todo_wine + expectf_(5.0 - height_rgn/2.0, bounds.Y, 1.0); +todo_wine + expectf_(width_rgn, bounds.Width, 1.0); +todo_wine + expectf_(height_rgn, bounds.Height, 1.0); + + /* Far alignment */ GdipSetStringFormatAlign(format, StringAlignmentFar); GdipSetStringFormatLineAlign(format, StringAlignmentFar); @@ -4121,10 +4272,26 @@ todo_wine expect(3, glyphs); expect(1, lines); todo_wine - expectf(5.0 + width, bounds.X); + expectf_(5.0 + width, bounds.X, 0.01); todo_wine expectf(5.0 + height, bounds.Y); - expectf(width, bounds.Width); + expectf_(width, bounds.Width, 0.01); + expectf(height, bounds.Height); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines); + expect(Ok, status); + expect(3, glyphs); + expect(1, lines); +todo_wine + expectf_(5.0 - width, bounds.X, 0.01); +todo_wine + expectf(5.0 - height, bounds.Y); + expectf_(width, bounds.Width, 0.01); expectf(height, bounds.Height); rect.X = 5.0; @@ -4143,6 +4310,24 @@ todo_wine expectf_(width_rgn, bounds.Width, 1.0); expectf_(height_rgn, bounds.Height, 1.0); + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 0.0; + rect.Height = 0.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&bounds); + status = GdipGetRegionBounds(region, graphics, &bounds); + expect(Ok, status); +todo_wine + expectf_(5.0 - width_rgn, bounds.X, 2.0); +todo_wine + expectf_(5.0 - height_rgn, bounds.Y, 1.0); +todo_wine + expectf_(width_rgn, bounds.Width, 1.0); +todo_wine + expectf_(height_rgn, bounds.Height, 1.0); + status = GdipDeleteFont(font); expect(Ok, status);
1
0
0
0
Nikolay Sivov : msxml3: Use characters callback helper in one more place.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 81ffe0432e474d83a8a4d88421c18e47c09e3708 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81ffe0432e474d83a8a4d8842…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Mar 14 08:27:57 2013 +0400 msxml3: Use characters callback helper in one more place. --- dlls/msxml3/saxreader.c | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 5475e1a..5a0b1c2 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -349,6 +349,21 @@ static inline int saxreader_has_handler(const saxlocator *locator, enum saxhandl return (locator->vbInterface && iface->vbhandler) || (!locator->vbInterface && iface->handler); } +static HRESULT saxreader_saxcharacters(saxlocator *locator, BSTR chars) +{ + struct saxcontenthandler_iface *content = saxreader_get_contenthandler(locator->saxreader); + HRESULT hr; + + if (!saxreader_has_handler(locator, SAXContentHandler)) return S_OK; + + if (locator->vbInterface) + hr = IVBSAXContentHandler_characters(content->vbhandler, &chars); + else + hr = ISAXContentHandler_characters(content->handler, chars, SysStringLen(chars)); + + return hr; +} + /* property names */ static const WCHAR PropertyCharsetW[] = { 'c','h','a','r','s','e','t',0 @@ -1565,7 +1580,6 @@ static void libxmlCharacters( int len) { saxlocator *This = ctx; - struct saxcontenthandler_iface *handler = saxreader_get_contenthandler(This->saxreader); BSTR Chars; HRESULT hr; xmlChar *cur, *end; @@ -1624,10 +1638,7 @@ static void libxmlCharacters( } Chars = pooled_bstr_from_xmlCharN(&This->saxreader->pool, cur, end-cur); - if(This->vbInterface) - hr = IVBSAXContentHandler_characters(handler->vbhandler, &Chars); - else - hr = ISAXContentHandler_characters(handler->handler, Chars, SysStringLen(Chars)); + hr = saxreader_saxcharacters(This, Chars); if (sax_callback_failed(This, hr)) { @@ -1799,21 +1810,6 @@ static BSTR saxreader_get_cdata_chunk(const xmlChar *str, int len) return ret; } -static HRESULT saxreader_saxcharacters(saxlocator *locator, BSTR chars) -{ - struct saxcontenthandler_iface *content = saxreader_get_contenthandler(locator->saxreader); - HRESULT hr; - - if (!saxreader_has_handler(locator, SAXContentHandler)) return S_OK; - - if (locator->vbInterface) - hr = IVBSAXContentHandler_characters(content->vbhandler, &chars); - else - hr = ISAXContentHandler_characters(content->handler, chars, SysStringLen(chars)); - - return hr; -} - static void libxml_cdatablock(void *ctx, const xmlChar *value, int len) { const xmlChar *start, *end;
1
0
0
0
Ken Thomases : winemac: Implement support for drag-and-drop.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 7993bd3d9010d752704fd25e16ea775852540b33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7993bd3d9010d752704fd25e1…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 13 16:53:32 2013 -0500 winemac: Implement support for drag-and-drop. --- dlls/winemac.drv/Makefile.in | 4 +- dlls/winemac.drv/clipboard.c | 8 +- dlls/winemac.drv/cocoa_event.m | 17 +- dlls/winemac.drv/cocoa_window.m | 74 +++++ dlls/winemac.drv/dragdrop.c | 635 +++++++++++++++++++++++++++++++++++++++ dlls/winemac.drv/event.c | 12 + dlls/winemac.drv/macdrv.h | 8 + dlls/winemac.drv/macdrv_cocoa.h | 29 ++ 8 files changed, 780 insertions(+), 7 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7993bd3d9010d752704fd…
1
0
0
0
Ken Thomases : winemac: Extract new function from macdrv_EnumClipboardFormats() parameterized by the target pasteboard.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: fb5794a764b302bce91f938d8fdef396ac8d6922 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb5794a764b302bce91f938d8…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 13 16:53:27 2013 -0500 winemac: Extract new function from macdrv_EnumClipboardFormats() parameterized by the target pasteboard. --- dlls/winemac.drv/clipboard.c | 159 +++++++++++++++++++++++++----------------- 1 files changed, 96 insertions(+), 63 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index fa4857b..40445f6 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1367,6 +1367,79 @@ static BOOL macdrv_pasteboard_has_format(CFTypeRef pasteboard, UINT desired_form /************************************************************************** + * macdrv_copy_pasteboard_formats + */ +static CFArrayRef macdrv_copy_pasteboard_formats(CFTypeRef pasteboard) +{ + CFArrayRef types; + CFIndex count; + CFMutableArrayRef formats; + CFIndex i; + + TRACE("pasteboard %p\n", pasteboard); + + types = macdrv_copy_pasteboard_types(pasteboard); + if (!types) + { + WARN("Failed to copy pasteboard types\n"); + return NULL; + } + + count = CFArrayGetCount(types); + TRACE("got %ld types\n", count); + + if (!count) + { + CFRelease(types); + return NULL; + } + + formats = CFArrayCreateMutable(NULL, 0, NULL); + if (!formats) + { + WARN("Failed to allocate formats array\n"); + CFRelease(types); + return NULL; + } + + for (i = 0; i < count; i++) + { + CFStringRef type = CFArrayGetValueAtIndex(types, i); + WINE_CLIPFORMAT* format; + + format = NULL; + while ((format = format_for_type(format, type))) + { + TRACE("for type %s got format %p/%s\n", debugstr_cf(type), format, debugstr_format(format->format_id)); + + if (format->synthesized) + { + /* Don't override a real value with a synthesized value. */ + if (!CFArrayContainsValue(formats, CFRangeMake(0, CFArrayGetCount(formats)), (void*)format->format_id)) + CFArrayAppendValue(formats, (void*)format->format_id); + } + else + { + /* If the type was already in the array, it must have been synthesized + because this one's real. Remove the synthesized entry in favor of + this one. */ + CFIndex index = CFArrayGetFirstIndexOfValue(formats, CFRangeMake(0, CFArrayGetCount(formats)), + (void*)format->format_id); + if (index != kCFNotFound) + CFArrayRemoveValueAtIndex(formats, index); + CFArrayAppendValue(formats, (void*)format->format_id); + } + } + } + + CFRelease(types); + + TRACE(" -> %s\n", debugstr_cf(formats)); + return formats; +} + + +/************************************************************************** * check_clipboard_ownership */ static void check_clipboard_ownership(HWND *owner) @@ -1498,88 +1571,48 @@ void CDECL macdrv_EndClipboardUpdate(void) */ UINT CDECL macdrv_EnumClipboardFormats(UINT prev_format) { - CFArrayRef types; CFIndex count; CFIndex i; - UINT ret; + UINT ret = 0; TRACE("prev_format %s\n", debugstr_format(prev_format)); check_clipboard_ownership(NULL); - types = macdrv_copy_pasteboard_types(NULL); - if (!types) - { - WARN("Failed to copy pasteboard types\n"); - return 0; - } - - count = CFArrayGetCount(types); - TRACE("got %ld types\n", count); - - if (!count) - { - CFRelease(types); - return 0; - } - if (prev_format) { - CFMutableArrayRef formats = CFArrayCreateMutable(NULL, 0, NULL); - if (!formats) + CFArrayRef formats = macdrv_copy_pasteboard_formats(NULL); + if (formats) { - WARN("Failed to allocate array to track formats\n"); - CFRelease(types); - return 0; - } + count = CFArrayGetCount(formats); + i = CFArrayGetFirstIndexOfValue(formats, CFRangeMake(0, count), (void*)prev_format); + if (i != kCFNotFound && i + 1 < count) + ret = (UINT)CFArrayGetValueAtIndex(formats, i + 1); - for (i = 0; i < count; i++) + CFRelease(formats); + } + } + else + { + CFArrayRef types = macdrv_copy_pasteboard_types(NULL); + if (types) { - CFStringRef type = CFArrayGetValueAtIndex(types, i); - WINE_CLIPFORMAT* format; + count = CFArrayGetCount(types); + TRACE("got %ld types\n", count); - format = NULL; - while ((format = format_for_type(format, type))) + if (count) { - TRACE("for type %s got format %p/%s\n", debugstr_cf(type), format, debugstr_format(format->format_id)); + CFStringRef type = CFArrayGetValueAtIndex(types, 0); + WINE_CLIPFORMAT *format = format_for_type(NULL, type); - if (format->synthesized) - { - /* Don't override a real value with a synthesized value. */ - if (!CFArrayContainsValue(formats, CFRangeMake(0, CFArrayGetCount(formats)), (void*)format->format_id)) - CFArrayAppendValue(formats, (void*)format->format_id); - } - else - { - /* If the type was already in the array, it must have been synthesized - because this one's real. Remove the synthesized entry in favor of - this one. */ - CFIndex index = CFArrayGetFirstIndexOfValue(formats, CFRangeMake(0, CFArrayGetCount(formats)), - (void*)format->format_id); - if (index != kCFNotFound) - CFArrayRemoveValueAtIndex(formats, index); - CFArrayAppendValue(formats, (void*)format->format_id); - } + ret = format ? format->format_id : 0; } - } - count = CFArrayGetCount(formats); - i = CFArrayGetFirstIndexOfValue(formats, CFRangeMake(0, count), (void*)prev_format); - if (i == kCFNotFound || i + 1 >= count) - ret = 0; + CFRelease(types); + } else - ret = (UINT)CFArrayGetValueAtIndex(formats, i + 1); - - CFRelease(formats); + WARN("Failed to copy pasteboard types\n"); } - else - { - CFStringRef type = CFArrayGetValueAtIndex(types, 0); - WINE_CLIPFORMAT *format = format_for_type(NULL, type); - ret = format ? format->format_id : 0; - } - - CFRelease(types); TRACE(" -> %u\n", ret); return ret; }
1
0
0
0
Ken Thomases : winemac: Extract new function from macdrv_IsClipboardFormatAvailable() parameterized by the target pasteboard.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: caf6db7bf981e929851e8807dda4f2fead3bdee7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=caf6db7bf981e929851e8807d…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 13 16:53:21 2013 -0500 winemac: Extract new function from macdrv_IsClipboardFormatAvailable() parameterized by the target pasteboard. --- dlls/winemac.drv/clipboard.c | 79 +++++++++++++++++++++++------------------ 1 files changed, 44 insertions(+), 35 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index 4197515..fa4857b 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1324,6 +1324,49 @@ static HANDLE macdrv_get_pasteboard_data(CFTypeRef pasteboard, UINT desired_form /************************************************************************** + * macdrv_pasteboard_has_format + */ +static BOOL macdrv_pasteboard_has_format(CFTypeRef pasteboard, UINT desired_format) +{ + CFArrayRef types; + int count; + UINT i; + BOOL found = FALSE; + + TRACE("pasteboard %p, desired_format %s\n", pasteboard, debugstr_format(desired_format)); + + types = macdrv_copy_pasteboard_types(pasteboard); + if (!types) + { + WARN("Failed to copy pasteboard types\n"); + return FALSE; + } + + count = CFArrayGetCount(types); + TRACE("got %d types\n", count); + + for (i = 0; !found && i < count; i++) + { + CFStringRef type = CFArrayGetValueAtIndex(types, i); + WINE_CLIPFORMAT* format; + + format = NULL; + while (!found && (format = format_for_type(format, type))) + { + TRACE("for type %s got format %s\n", debugstr_cf(type), debugstr_format(format->format_id)); + + if (format->format_id == desired_format) + found = TRUE; + } + } + + CFRelease(types); + TRACE(" -> %d\n", found); + return found; +} + + +/************************************************************************** * check_clipboard_ownership */ static void check_clipboard_ownership(HWND *owner) @@ -1558,42 +1601,8 @@ HANDLE CDECL macdrv_GetClipboardData(UINT desired_format) */ BOOL CDECL macdrv_IsClipboardFormatAvailable(UINT desired_format) { - CFArrayRef types; - int count; - UINT i; - BOOL found = FALSE; - - TRACE("desired_format %s\n", debugstr_format(desired_format)); check_clipboard_ownership(NULL); - - types = macdrv_copy_pasteboard_types(NULL); - if (!types) - { - WARN("Failed to copy pasteboard types\n"); - return FALSE; - } - - count = CFArrayGetCount(types); - TRACE("got %d types\n", count); - - for (i = 0; !found && i < count; i++) - { - CFStringRef type = CFArrayGetValueAtIndex(types, i); - WINE_CLIPFORMAT* format; - - format = NULL; - while (!found && (format = format_for_type(format, type))) - { - TRACE("for type %s got format %s\n", debugstr_cf(type), debugstr_format(format->format_id)); - - if (format->format_id == desired_format) - found = TRUE; - } - } - - CFRelease(types); - TRACE(" -> %d\n", found); - return found; + return macdrv_pasteboard_has_format(NULL, desired_format); }
1
0
0
0
Ken Thomases : winemac: Extract new function from macdrv_GetClipboardData() parameterized by the target pasteboard.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: c8e6bad15338252b5d93d542feda93b747189871 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8e6bad15338252b5d93d542f…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 13 16:53:16 2013 -0500 winemac: Extract new function from macdrv_GetClipboardData() parameterized by the target pasteboard. --- dlls/winemac.drv/clipboard.c | 126 ++++++++++++++++++++++------------------- 1 files changed, 68 insertions(+), 58 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index 4a6f859..4197515 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1257,6 +1257,73 @@ static BOOL release_ownership(void) /************************************************************************** + * macdrv_get_pasteboard_data + */ +static HANDLE macdrv_get_pasteboard_data(CFTypeRef pasteboard, UINT desired_format) +{ + CFArrayRef types; + CFIndex count; + CFIndex i; + CFStringRef type, best_type; + WINE_CLIPFORMAT* best_format = NULL; + HANDLE data = NULL; + + TRACE("pasteboard %p, desired_format %s\n", pasteboard, debugstr_format(desired_format)); + + types = macdrv_copy_pasteboard_types(pasteboard); + if (!types) + { + WARN("Failed to copy pasteboard types\n"); + return NULL; + } + + count = CFArrayGetCount(types); + TRACE("got %ld types\n", count); + + for (i = 0; (!best_format || best_format->synthesized) && i < count; i++) + { + WINE_CLIPFORMAT* format; + + type = CFArrayGetValueAtIndex(types, i); + + format = NULL; + while ((!best_format || best_format->synthesized) && (format = format_for_type(format, type))) + { + TRACE("for type %s got format %p/%s\n", debugstr_cf(type), format, debugstr_format(format ? format->format_id : 0)); + + if (format->format_id == desired_format) + { + /* The best format is the matching one which is not synthesized. Failing that, + the best format is the first matching synthesized format. */ + if (!format->synthesized || !best_format) + { + best_type = type; + best_format = format; + } + } + } + } + + if (best_format) + { + CFDataRef pasteboard_data = macdrv_copy_pasteboard_data(pasteboard, best_type); + + TRACE("got pasteboard data for type %s: %s\n", debugstr_cf(best_type), debugstr_cf(pasteboard_data)); + + if (pasteboard_data) + { + data = best_format->import_func(pasteboard_data); + CFRelease(pasteboard_data); + } + } + + CFRelease(types); + TRACE(" -> %p\n", data); + return data; +} + + +/************************************************************************** * check_clipboard_ownership */ static void check_clipboard_ownership(HWND *owner) @@ -1480,66 +1547,9 @@ UINT CDECL macdrv_EnumClipboardFormats(UINT prev_format) */ HANDLE CDECL macdrv_GetClipboardData(UINT desired_format) { - CFArrayRef types; - CFIndex count; - CFIndex i; - CFStringRef type, best_type; - WINE_CLIPFORMAT* best_format = NULL; - HANDLE data = NULL; - - TRACE("desired_format %s\n", debugstr_format(desired_format)); check_clipboard_ownership(NULL); - types = macdrv_copy_pasteboard_types(NULL); - if (!types) - { - WARN("Failed to copy pasteboard types\n"); - return NULL; - } - - count = CFArrayGetCount(types); - TRACE("got %ld types\n", count); - - for (i = 0; (!best_format || best_format->synthesized) && i < count; i++) - { - WINE_CLIPFORMAT* format; - - type = CFArrayGetValueAtIndex(types, i); - - format = NULL; - while ((!best_format || best_format->synthesized) && (format = format_for_type(format, type))) - { - TRACE("for type %s got format %p/%s\n", debugstr_cf(type), format, debugstr_format(format ? format->format_id : 0)); - - if (format->format_id == desired_format) - { - /* The best format is the matching one which is not synthesized. Failing that, - the best format is the first matching synthesized format. */ - if (!format->synthesized || !best_format) - { - best_type = type; - best_format = format; - } - } - } - } - - if (best_format) - { - CFDataRef pasteboard_data = macdrv_copy_pasteboard_data(NULL, best_type); - - TRACE("got pasteboard data for type %s: %s\n", debugstr_cf(best_type), debugstr_cf(pasteboard_data)); - - if (pasteboard_data) - { - data = best_format->import_func(pasteboard_data); - CFRelease(pasteboard_data); - } - } - - CFRelease(types); - TRACE(" -> %p\n", data); - return data; + return macdrv_get_pasteboard_data(NULL, desired_format); }
1
0
0
0
Ken Thomases : winemac: Enable pasteboard functions to operate on arbitrary pasteboards.
by Alexandre Julliard
14 Mar '13
14 Mar '13
Module: wine Branch: master Commit: 4ae5b106f80eb29ed0b05b74edf054b622fb7ac8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ae5b106f80eb29ed0b05b74e…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 13 16:53:04 2013 -0500 winemac: Enable pasteboard functions to operate on arbitrary pasteboards. ... not just the general pasteboard (although the general pasteboard is still the default). --- dlls/winemac.drv/clipboard.c | 12 ++++++------ dlls/winemac.drv/cocoa_clipboard.m | 22 ++++++++++++++-------- dlls/winemac.drv/macdrv_cocoa.h | 4 ++-- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index 2219df6..4a6f859 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1326,7 +1326,7 @@ INT CDECL macdrv_CountClipboardFormats(void) return 0; } - types = macdrv_copy_pasteboard_types(); + types = macdrv_copy_pasteboard_types(NULL); if (!types) { WARN("Failed to copy pasteboard types\n"); @@ -1396,7 +1396,7 @@ UINT CDECL macdrv_EnumClipboardFormats(UINT prev_format) TRACE("prev_format %s\n", debugstr_format(prev_format)); check_clipboard_ownership(NULL); - types = macdrv_copy_pasteboard_types(); + types = macdrv_copy_pasteboard_types(NULL); if (!types) { WARN("Failed to copy pasteboard types\n"); @@ -1490,7 +1490,7 @@ HANDLE CDECL macdrv_GetClipboardData(UINT desired_format) TRACE("desired_format %s\n", debugstr_format(desired_format)); check_clipboard_ownership(NULL); - types = macdrv_copy_pasteboard_types(); + types = macdrv_copy_pasteboard_types(NULL); if (!types) { WARN("Failed to copy pasteboard types\n"); @@ -1526,7 +1526,7 @@ HANDLE CDECL macdrv_GetClipboardData(UINT desired_format) if (best_format) { - CFDataRef pasteboard_data = macdrv_copy_pasteboard_data(best_type); + CFDataRef pasteboard_data = macdrv_copy_pasteboard_data(NULL, best_type); TRACE("got pasteboard data for type %s: %s\n", debugstr_cf(best_type), debugstr_cf(pasteboard_data)); @@ -1556,7 +1556,7 @@ BOOL CDECL macdrv_IsClipboardFormatAvailable(UINT desired_format) TRACE("desired_format %s\n", debugstr_format(desired_format)); check_clipboard_ownership(NULL); - types = macdrv_copy_pasteboard_types(); + types = macdrv_copy_pasteboard_types(NULL); if (!types) { WARN("Failed to copy pasteboard types\n"); @@ -1758,7 +1758,7 @@ BOOL query_pasteboard_data(HWND hwnd, CFStringRef type) if (!types) { - types = macdrv_copy_pasteboard_types(); + types = macdrv_copy_pasteboard_types(NULL); if (!types) { WARN("Failed to copy pasteboard types\n"); diff --git a/dlls/winemac.drv/cocoa_clipboard.m b/dlls/winemac.drv/cocoa_clipboard.m index 8d29326..b8ca796 100644 --- a/dlls/winemac.drv/cocoa_clipboard.m +++ b/dlls/winemac.drv/cocoa_clipboard.m @@ -53,8 +53,9 @@ int macdrv_is_pasteboard_owner(void) * the pasteboard, or NULL on error. The caller is responsible for * releasing the returned array with CFRelease(). */ -CFArrayRef macdrv_copy_pasteboard_types(void) +CFArrayRef macdrv_copy_pasteboard_types(CFTypeRef pasteboard) { + NSPasteboard* pb = (NSPasteboard*)pasteboard; __block CFArrayRef ret = NULL; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -79,8 +80,11 @@ CFArrayRef macdrv_copy_pasteboard_types(void) OnMainThread(^{ @try { - NSPasteboard* pb = [NSPasteboard generalPasteboard]; - NSArray* types = [pb types]; + NSPasteboard* local_pb = pb; + NSArray* types; + + if (!local_pb) local_pb = [NSPasteboard generalPasteboard]; + types = [local_pb types]; // If there are any types understood by NSBitmapImageRep, then we // can offer all of the types that it can output, too. For example, @@ -115,22 +119,24 @@ CFArrayRef macdrv_copy_pasteboard_types(void) * if there's no such type on the pasteboard. The caller is responsible * for releasing the returned data object with CFRelease(). */ -CFDataRef macdrv_copy_pasteboard_data(CFStringRef type) +CFDataRef macdrv_copy_pasteboard_data(CFTypeRef pasteboard, CFStringRef type) { + NSPasteboard* pb = (NSPasteboard*)pasteboard; __block NSData* ret = nil; OnMainThread(^{ @try { - NSPasteboard* pb = [NSPasteboard generalPasteboard]; - if ([pb availableTypeFromArray:[NSArray arrayWithObject:(NSString*)type]]) - ret = [[pb dataForType:(NSString*)type] copy]; + NSPasteboard* local_pb = pb; + if (!local_pb) local_pb = [NSPasteboard generalPasteboard]; + if ([local_pb availableTypeFromArray:[NSArray arrayWithObject:(NSString*)type]]) + ret = [[local_pb dataForType:(NSString*)type] copy]; else { NSNumber* bitmapType = [BitmapOutputTypeMap objectForKey:(NSString*)type]; if (bitmapType) { - NSArray* reps = [NSBitmapImageRep imageRepsWithPasteboard:pb]; + NSArray* reps = [NSBitmapImageRep imageRepsWithPasteboard:local_pb]; ret = [NSBitmapImageRep representationOfImageRepsInArray:reps usingType:[bitmapType unsignedIntegerValue] properties:nil]; diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index bbd3424..95a3720 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -304,8 +304,8 @@ extern CFDataRef macdrv_copy_keyboard_layout(CGEventSourceKeyboardType* keyboard /* clipboard */ -extern CFArrayRef macdrv_copy_pasteboard_types(void) DECLSPEC_HIDDEN; -extern CFDataRef macdrv_copy_pasteboard_data(CFStringRef type) DECLSPEC_HIDDEN; +extern CFArrayRef macdrv_copy_pasteboard_types(CFTypeRef pasteboard) DECLSPEC_HIDDEN; +extern CFDataRef macdrv_copy_pasteboard_data(CFTypeRef pasteboard, CFStringRef type) DECLSPEC_HIDDEN; extern int macdrv_is_pasteboard_owner(void) DECLSPEC_HIDDEN; extern void macdrv_clear_pasteboard(void) DECLSPEC_HIDDEN; extern int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w) DECLSPEC_HIDDEN;
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
54
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
Results per page:
10
25
50
100
200