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
July 2007
----- 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
3 participants
957 discussions
Start a n
N
ew thread
Juan Lang : crypt32: Move digested data encoding to encode.c.
by Alexandre Julliard
18 Jul '07
18 Jul '07
Module: wine Branch: master Commit: 703a0f6fce49553fd66bc120f1d5128ea5250ead URL:
http://source.winehq.org/git/wine.git/?a=commit;h=703a0f6fce49553fd66bc120f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Jul 17 07:22:50 2007 -0700 crypt32: Move digested data encoding to encode.c. --- dlls/crypt32/crypt32_private.h | 24 +++++++++---------- dlls/crypt32/encode.c | 36 +++++++++++++++++++++++++----- dlls/crypt32/msg.c | 48 +++++++++++++-------------------------- 3 files changed, 57 insertions(+), 51 deletions(-) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 477d01d..d65c4ad 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -67,23 +67,21 @@ BOOL WINAPI CRYPT_AsnEncodeConstructed(DWORD dwCertEncodingType, BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); -BOOL WINAPI CRYPT_AsnEncodeInt(DWORD dwCertEncodingType, - LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, - PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); -/* Like CRYPT_AsnEncodeAlgorithmId, but encodes parameters as an asn.1 NULL - * if they are empty. - */ -BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams(DWORD dwCertEncodingType, - LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, - PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); -/* Like CRYPT_AsnEncodePKCSContentInfo, but allows the OID to be NULL */ -BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal(DWORD dwCertEncodingType, - LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, - PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); BOOL WINAPI CRYPT_AsnEncodeOctets(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); +typedef struct _CRYPT_DIGESTED_DATA +{ + DWORD version; + CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm; + CRYPT_CONTENT_INFO ContentInfo; + CRYPT_HASH_BLOB hash; +} CRYPT_DIGESTED_DATA; + +BOOL CRYPT_AsnEncodePKCSDigestedData(CRYPT_DIGESTED_DATA *digestedData, + void *pvData, DWORD *pcbData); + /* Helper function to check *pcbEncoded, set it to the required size, and * optionally to allocate memory. Assumes pbEncoded is not NULL. * If CRYPT_ENCODE_ALLOC_FLAG is set in dwFlags, *pbEncoded will be set to a diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c index 0a1affc..a7cb661 100644 --- a/dlls/crypt32/encode.c +++ b/dlls/crypt32/encode.c @@ -78,6 +78,9 @@ static BOOL WINAPI CRYPT_AsnEncodeBits(DWORD dwCertEncodingType, static BOOL WINAPI CRYPT_AsnEncodeBitsSwapBytes(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); +static BOOL WINAPI CRYPT_AsnEncodeInt(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, + PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); static BOOL WINAPI CRYPT_AsnEncodeInteger(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); @@ -388,9 +391,13 @@ static BOOL WINAPI CRYPT_AsnEncodeValidity(DWORD dwCertEncodingType, return ret; } -BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams(DWORD dwCertEncodingType, - LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, - PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) +/* Like CRYPT_AsnEncodeAlgorithmId, but encodes parameters as an asn.1 NULL + * if they are empty. + */ +static BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams( + DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, + DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, + DWORD *pcbEncoded) { const CRYPT_ALGORITHM_IDENTIFIER *algo = (const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo; @@ -1439,9 +1446,11 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSAttributes(DWORD dwCertEncodingType, return ret; } -BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal(DWORD dwCertEncodingType, - LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, - PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) +/* Like CRYPT_AsnEncodePKCSContentInfo, but allows the OID to be NULL */ +static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal( + DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, + DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, + DWORD *pcbEncoded) { const CRYPT_CONTENT_INFO *info = (const CRYPT_CONTENT_INFO *)pvStructInfo; struct AsnEncodeSequenceItem items[2] = { @@ -1464,6 +1473,21 @@ BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal(DWORD dwCertEncodingType, cItem, dwFlags, pEncodePara, pbEncoded, pcbEncoded); } +BOOL CRYPT_AsnEncodePKCSDigestedData(CRYPT_DIGESTED_DATA *digestedData, + void *pvData, DWORD *pcbData) +{ + struct AsnEncodeSequenceItem items[] = { + { &digestedData->version, CRYPT_AsnEncodeInt, 0 }, + { &digestedData->DigestAlgorithm, CRYPT_AsnEncodeAlgorithmIdWithNullParams, + 0 }, + { &digestedData->ContentInfo, CRYPT_AsnEncodePKCSContentInfoInternal, 0 }, + { &digestedData->hash, CRYPT_AsnEncodeOctets, 0 }, + }; + + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, + sizeof(items) / sizeof(items[0]), 0, NULL, pvData, pcbData); +} + static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfo(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 854ee7c..81b9cdd 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -347,56 +347,40 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData, ret = CryptGetHashParam(msg->hash, HP_ALGID, (BYTE *)&algID, &size, 0); if (ret) { - CRYPT_ALGORITHM_IDENTIFIER algoId = { 0 }; - DWORD version = CMSG_HASHED_DATA_PKCS_1_5_VERSION; - struct AsnEncodeSequenceItem items[7] = { { 0 } }; - DWORD cItem = 0; - CRYPT_DATA_BLOB hash = { 0, NULL }; - CRYPT_CONTENT_INFO contentInfo = { NULL, { 0, NULL } }; + CRYPT_DIGESTED_DATA digestedData = { 0 }; char oid_rsa_data[] = szOID_RSA_data; - items[cItem].pvStructInfo = &version; - items[cItem].encodeFunc = CRYPT_AsnEncodeInt; - cItem++; - algoId.pszObjId = (LPSTR)CertAlgIdToOID(algID); - /* FIXME: what about algoId.Parameters? */ - items[cItem].pvStructInfo = &algoId; - items[cItem].encodeFunc = CRYPT_AsnEncodeAlgorithmIdWithNullParams; - cItem++; + digestedData.version = CMSG_HASHED_DATA_PKCS_1_5_VERSION; + digestedData.DigestAlgorithm.pszObjId = (LPSTR)CertAlgIdToOID(algID); + /* FIXME: what about digestedData.DigestAlgorithm.Parameters? */ /* Quirk: OID is only encoded messages if an update has happened */ if (msg->base.state != MsgStateInit) - contentInfo.pszObjId = oid_rsa_data; + digestedData.ContentInfo.pszObjId = oid_rsa_data; if (!(msg->base.open_flags & CMSG_DETACHED_FLAG) && msg->data.cbData) { ret = CRYPT_AsnEncodeOctets(0, NULL, &msg->data, CRYPT_ENCODE_ALLOC_FLAG, NULL, - (LPBYTE)&contentInfo.Content.pbData, - &contentInfo.Content.cbData); + (LPBYTE)&digestedData.ContentInfo.Content.pbData, + &digestedData.ContentInfo.Content.cbData); } - items[cItem].pvStructInfo = &contentInfo; - items[cItem].encodeFunc = - CRYPT_AsnEncodePKCSContentInfoInternal; - cItem++; if (msg->base.state == MsgStateFinalized) { size = sizeof(DWORD); ret = CryptGetHashParam(msg->hash, HP_HASHSIZE, - (LPBYTE)&hash.cbData, &size, 0); + (LPBYTE)&digestedData.hash.cbData, &size, 0); if (ret) { - hash.pbData = CryptMemAlloc(hash.cbData); - ret = CryptGetHashParam(msg->hash, HP_HASHVAL, hash.pbData, - &hash.cbData, 0); + digestedData.hash.pbData = CryptMemAlloc( + digestedData.hash.cbData); + ret = CryptGetHashParam(msg->hash, HP_HASHVAL, + digestedData.hash.pbData, &digestedData.hash.cbData, 0); } } - items[cItem].pvStructInfo = &hash; - items[cItem].encodeFunc = CRYPT_AsnEncodeOctets; - cItem++; if (ret) - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, cItem, - 0, NULL, pvData, pcbData); - CryptMemFree(hash.pbData); - LocalFree(contentInfo.Content.pbData); + ret = CRYPT_AsnEncodePKCSDigestedData(&digestedData, pvData, + pcbData); + CryptMemFree(digestedData.hash.pbData); + LocalFree(digestedData.ContentInfo.Content.pbData); } return ret; }
1
0
0
0
Rob Shearman : rpcrt4: Add some more RPC to NCA status code mappings.
by Alexandre Julliard
18 Jul '07
18 Jul '07
Module: wine Branch: master Commit: d212adbf10c1dce0dd397709279f4e2893253792 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d212adbf10c1dce0dd3977092…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jul 17 14:05:01 2007 +0100 rpcrt4: Add some more RPC to NCA status code mappings. Add RPC_S_SEC_PKG_ERROR to the list of "hard" errors. --- dlls/rpcrt4/rpc_message.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index bfd5aec..03e0737 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -301,6 +301,12 @@ NCA_STATUS RPC2NCA_STATUS(RPC_STATUS status) case RPC_S_INVALID_BOUND: return NCA_S_FAULT_INVALID_BOUND; case RPC_S_PROCNUM_OUT_OF_RANGE: return NCA_S_OP_RNG_ERROR; case RPC_X_SS_HANDLES_MISMATCH: return NCA_S_FAULT_CONTEXT_MISMATCH; + case RPC_S_CALL_CANCELLED: return NCA_S_FAULT_CANCEL; + case RPC_S_COMM_FAILURE: return NCA_S_COMM_FAILURE; + case RPC_X_WRONG_PIPE_ORDER: return NCA_S_FAULT_PIPE_ORDER; + case RPC_X_PIPE_CLOSED: return NCA_S_FAULT_PIPE_CLOSED; + case RPC_X_PIPE_DISCIPLINE_ERROR: return NCA_S_FAULT_PIPE_DISCIPLINE; + case RPC_X_PIPE_EMPTY: return NCA_S_FAULT_PIPE_EMPTY; case STATUS_FLOAT_DIVIDE_BY_ZERO: return NCA_S_FAULT_FP_DIV_ZERO; case STATUS_FLOAT_INVALID_OPERATION: return NCA_S_FAULT_FP_ERROR; case STATUS_FLOAT_OVERFLOW: return NCA_S_FAULT_FP_OVERFLOW; @@ -1013,6 +1019,7 @@ static inline BOOL is_hard_error(RPC_STATUS status) case RPC_S_PROTOCOL_ERROR: case RPC_S_CALL_FAILED: case RPC_S_CALL_FAILED_DNE: + case RPC_S_SEC_PKG_ERROR: return TRUE; default: return FALSE;
1
0
0
0
Evan Stade : gdi32: Added PATH_PolyDraw.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: 96937e04a24d7e27b1bd2e97a730b67ad4ef2385 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96937e04a24d7e27b1bd2e97a…
Author: Evan Stade <estade(a)gmail.com> Date: Mon Jul 16 19:45:28 2007 -0700 gdi32: Added PATH_PolyDraw. --- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/painting.c | 14 ++++----- dlls/gdi32/path.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/gdi32/tests/path.c | 28 +++++++++---------- 4 files changed, 87 insertions(+), 23 deletions(-) diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index c6810dd..73627d7 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -481,6 +481,7 @@ extern BOOL PATH_Arc(DC *dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd, INT lines); extern BOOL PATH_PolyBezierTo(DC *dc, const POINT *pt, DWORD cbCount); extern BOOL PATH_PolyBezier(DC *dc, const POINT *pt, DWORD cbCount); +extern BOOL PATH_PolyDraw(DC *dc, const POINT *pts, const BYTE *types, DWORD cbCount); extern BOOL PATH_PolylineTo(DC *dc, const POINT *pt, DWORD cbCount); extern BOOL PATH_Polyline(DC *dc, const POINT *pt, DWORD cbCount); extern BOOL PATH_Polygon(DC *dc, const POINT *pt, DWORD cbCount); diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index 4a8b8c9..ed3f9b0 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -830,12 +830,11 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, dc = DC_GetDCUpdate( hdc ); if(!dc) return FALSE; - if(dc->funcs->pPolyDraw) - { + if( PATH_IsPathOpen( dc->path ) ) + result = PATH_PolyDraw(dc, lppt, lpbTypes, cCount); + else if(dc->funcs->pPolyDraw) result = dc->funcs->pPolyDraw( dc->physDev, lppt, lpbTypes, cCount ); - goto end; - } - + else { /* check for each bezierto if there are two more points */ for( i = 0; i < cCount; i++ ) if( lpbTypes[i] != PT_MOVETO && @@ -872,14 +871,13 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, if( lpbTypes[i] & PT_CLOSEFIGURE ) { - if( PATH_IsPathOpen( dc->path ) ) - CloseFigure( hdc ); - else LineTo( hdc, lastmove.x, lastmove.y ); } } result = TRUE; + } + end: GDI_ReleaseObj( hdc ); return result; diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 1a37adc..7de7385 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -933,6 +933,73 @@ BOOL PATH_PolyBezier(DC *dc, const POINT *pts, DWORD cbPoints) return TRUE; } +/* PATH_PolyDraw + * + * Should be called when a call to PolyDraw is performed on a DC that has + * an open path. Returns TRUE if successful, else FALSE. + */ +BOOL PATH_PolyDraw(DC *dc, const POINT *pts, const BYTE *types, + DWORD cbPoints) +{ + GdiPath *pPath = &dc->path; + POINT lastmove, orig_pos; + INT i; + + lastmove.x = orig_pos.x = dc->CursPosX; + lastmove.y = orig_pos.y = dc->CursPosY; + + for(i = pPath->numEntriesUsed - 1; i >= 0; i--){ + if(pPath->pFlags[i] == PT_MOVETO){ + lastmove.x = pPath->pPoints[i].x; + lastmove.y = pPath->pPoints[i].y; + if(!DPtoLP(dc->hSelf, &lastmove, 1)) + return FALSE; + break; + } + } + + for(i = 0; i < cbPoints; i++){ + if(types[i] == PT_MOVETO){ + pPath->newStroke = TRUE; + lastmove.x = pts[i].x; + lastmove.y = pts[i].y; + } + else if((types[i] & ~PT_CLOSEFIGURE) == PT_LINETO){ + PATH_LineTo(dc, pts[i].x, pts[i].y); + } + else if(types[i] == PT_BEZIERTO){ + if(!((i + 2 < cbPoints) && (types[i + 1] == PT_BEZIERTO) + && ((types[i + 2] & ~PT_CLOSEFIGURE) == PT_BEZIERTO))) + goto err; + PATH_PolyBezierTo(dc, &(pts[i]), 3); + i += 2; + } + else + goto err; + + dc->CursPosX = pts[i].x; + dc->CursPosY = pts[i].y; + + if(types[i] & PT_CLOSEFIGURE){ + pPath->pFlags[pPath->numEntriesUsed-1] |= PT_CLOSEFIGURE; + pPath->newStroke = TRUE; + dc->CursPosX = lastmove.x; + dc->CursPosY = lastmove.y; + } + } + + return TRUE; + +err: + if((dc->CursPosX != orig_pos.x) || (dc->CursPosY != orig_pos.y)){ + pPath->newStroke = TRUE; + dc->CursPosX = orig_pos.x; + dc->CursPosY = orig_pos.y; + } + + return FALSE; +} + BOOL PATH_Polyline(DC *dc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath = &dc->path; diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c index 6e256c7..9f08ea4 100644 --- a/dlls/gdi32/tests/path.c +++ b/dlls/gdi32/tests/path.c @@ -301,25 +301,25 @@ static const path_test_t polydraw_path[] = { {95, 95, PT_LINETO, 0, 0}, /*4*/ {10, 10, PT_LINETO, 0, 0}, /*5*/ {10, 15, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /*6*/ - {100, 100, PT_MOVETO, 0, 1}, /*7*/ + {100, 100, PT_MOVETO, 0, 0}, /*7*/ {15, 15, PT_LINETO, 0, 0}, /*8*/ - {25, 25, PT_MOVETO, 0, 1}, /*9*/ - {25, 30, PT_LINETO, 0, 1}, /*10*/ - {100, 100, PT_MOVETO, 0, 1}, /*11*/ + {25, 25, PT_MOVETO, 0, 0}, /*9*/ + {25, 30, PT_LINETO, 0, 0}, /*10*/ + {100, 100, PT_MOVETO, 0, 0}, /*11*/ {30, 30, PT_BEZIERTO, 0, 0}, /*12*/ {30, 35, PT_BEZIERTO, 0, 0}, /*13*/ {35, 35, PT_BEZIERTO, 0, 0}, /*14*/ {35, 40, PT_LINETO, 0, 0}, /*15*/ {40, 40, PT_MOVETO, 0, 0}, /*16*/ {40, 45, PT_LINETO, 0, 0}, /*17*/ - {35, 40, PT_MOVETO, 0, 1}, /*18*/ - {45, 50, PT_LINETO, 0, 1}, /*19*/ - {35, 40, PT_MOVETO, 0, 1}, /*20*/ + {35, 40, PT_MOVETO, 0, 0}, /*18*/ + {45, 50, PT_LINETO, 0, 0}, /*19*/ + {35, 40, PT_MOVETO, 0, 0}, /*20*/ {50, 55, PT_LINETO, 0, 0}, /*21*/ {45, 50, PT_LINETO, 0, 0}, /*22*/ - {35, 40, PT_MOVETO, 0, 1}, /*23*/ - {60, 60, PT_LINETO, 0, 1}, /*24*/ - {60, 65, PT_MOVETO, 0, 1}, /*25*/ + {35, 40, PT_MOVETO, 0, 0}, /*23*/ + {60, 60, PT_LINETO, 0, 0}, /*24*/ + {60, 65, PT_MOVETO, 0, 0}, /*25*/ {65, 65, PT_LINETO, 0, 0} /*26*/ }; @@ -366,8 +366,7 @@ static void test_polydraw(void) expect(TRUE, retb); /* bad bezier points */ retb = PolyDraw(hdc, &(polydraw_pts[2]), &(polydraw_tps[2]), 4); - todo_wine - expect(FALSE, retb); + expect(FALSE, retb); retb = PolyDraw(hdc, &(polydraw_pts[6]), &(polydraw_tps[6]), 4); expect(FALSE, retb); /* good bezier points */ @@ -378,8 +377,7 @@ static void test_polydraw(void) expect(FALSE, retb); /* bad point type, has already moved cursor position */ retb = PolyDraw(hdc, &(polydraw_pts[15]), &(polydraw_tps[15]), 4); - todo_wine - expect(FALSE, retb); + expect(FALSE, retb); /* bad point type, cursor position is moved, but back to its original spot */ retb = PolyDraw(hdc, &(polydraw_pts[17]), &(polydraw_tps[17]), 4); expect(FALSE, retb); @@ -388,7 +386,7 @@ static void test_polydraw(void) expect(TRUE, retb); EndPath(hdc); - ok_path(hdc, "polydraw_path", polydraw_path, sizeof(polydraw_path)/sizeof(path_test_t), 1); + ok_path(hdc, "polydraw_path", polydraw_path, sizeof(polydraw_path)/sizeof(path_test_t), 0); done: ReleaseDC(0, hdc); }
1
0
0
0
Evan Stade : gdi32: Added PolyDraw tests.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: 578ff168b366a9248e8662e5c06c0f5ae3713441 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=578ff168b366a9248e8662e5c…
Author: Evan Stade <estade(a)gmail.com> Date: Mon Jul 16 19:45:21 2007 -0700 gdi32: Added PolyDraw tests. --- dlls/gdi32/tests/path.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c index e9b8e2f..6e256c7 100644 --- a/dlls/gdi32/tests/path.c +++ b/dlls/gdi32/tests/path.c @@ -31,6 +31,8 @@ #include "winuser.h" #include "winerror.h" +#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) + static void test_widenpath(void) { HDC hdc = GetDC(0); @@ -291,9 +293,110 @@ done: ReleaseDC(0, hdc); } +static const path_test_t polydraw_path[] = { + {0, 0, PT_MOVETO, 0, 0}, /*0*/ + {10, 10, PT_LINETO, 0, 0}, /*1*/ + {10, 15, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /*2*/ + {100, 100, PT_MOVETO, 0, 0}, /*3*/ + {95, 95, PT_LINETO, 0, 0}, /*4*/ + {10, 10, PT_LINETO, 0, 0}, /*5*/ + {10, 15, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /*6*/ + {100, 100, PT_MOVETO, 0, 1}, /*7*/ + {15, 15, PT_LINETO, 0, 0}, /*8*/ + {25, 25, PT_MOVETO, 0, 1}, /*9*/ + {25, 30, PT_LINETO, 0, 1}, /*10*/ + {100, 100, PT_MOVETO, 0, 1}, /*11*/ + {30, 30, PT_BEZIERTO, 0, 0}, /*12*/ + {30, 35, PT_BEZIERTO, 0, 0}, /*13*/ + {35, 35, PT_BEZIERTO, 0, 0}, /*14*/ + {35, 40, PT_LINETO, 0, 0}, /*15*/ + {40, 40, PT_MOVETO, 0, 0}, /*16*/ + {40, 45, PT_LINETO, 0, 0}, /*17*/ + {35, 40, PT_MOVETO, 0, 1}, /*18*/ + {45, 50, PT_LINETO, 0, 1}, /*19*/ + {35, 40, PT_MOVETO, 0, 1}, /*20*/ + {50, 55, PT_LINETO, 0, 0}, /*21*/ + {45, 50, PT_LINETO, 0, 0}, /*22*/ + {35, 40, PT_MOVETO, 0, 1}, /*23*/ + {60, 60, PT_LINETO, 0, 1}, /*24*/ + {60, 65, PT_MOVETO, 0, 1}, /*25*/ + {65, 65, PT_LINETO, 0, 0} /*26*/ + }; + +static POINT polydraw_pts[] = { + {10, 10}, {10, 15}, + {15, 15}, {15, 20}, {20, 20}, {20, 25}, + {25, 25}, {25, 30}, + {30, 30}, {30, 35}, {35, 35}, {35, 40}, + {40, 40}, {40, 45}, {45, 45}, + {45, 50}, {50, 50}, + {50, 55}, {45, 50}, {55, 60}, + {60, 60}, {60, 65}, {65, 65}}; + +static BYTE polydraw_tps[] = + {PT_LINETO, PT_CLOSEFIGURE | PT_LINETO, /* 2 */ + PT_LINETO, PT_BEZIERTO, PT_LINETO, PT_LINETO, /* 6 */ + PT_MOVETO, PT_LINETO, /* 8 */ + PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, /* 12 */ + PT_MOVETO, PT_LINETO, PT_CLOSEFIGURE, /* 15 */ + PT_LINETO, PT_MOVETO | PT_CLOSEFIGURE, /* 17 */ + PT_LINETO, PT_LINETO, PT_MOVETO | PT_CLOSEFIGURE, /* 20 */ + PT_LINETO, PT_MOVETO | PT_LINETO, PT_LINETO}; /* 23 */ + +static void test_polydraw(void) +{ + BOOL retb; + HDC hdc = GetDC(0); + BeginPath(hdc); + + /* closefigure with no previous moveto */ + if (!(retb = PolyDraw(hdc, polydraw_pts, polydraw_tps, 2)) && + GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* PolyDraw is only available on Win2k and later */ + skip("PolyDraw is not available\n"); + goto done; + } + expect(TRUE, retb); + + MoveToEx(hdc, 100, 100, NULL); + LineTo(hdc, 95, 95); + /* closefigure with previous moveto */ + retb = PolyDraw(hdc, polydraw_pts, polydraw_tps, 2); + expect(TRUE, retb); + /* bad bezier points */ + retb = PolyDraw(hdc, &(polydraw_pts[2]), &(polydraw_tps[2]), 4); + todo_wine + expect(FALSE, retb); + retb = PolyDraw(hdc, &(polydraw_pts[6]), &(polydraw_tps[6]), 4); + expect(FALSE, retb); + /* good bezier points */ + retb = PolyDraw(hdc, &(polydraw_pts[8]), &(polydraw_tps[8]), 4); + expect(TRUE, retb); + /* does lineto or bezierto take precedence? */ + retb = PolyDraw(hdc, &(polydraw_pts[12]), &(polydraw_tps[12]), 4); + expect(FALSE, retb); + /* bad point type, has already moved cursor position */ + retb = PolyDraw(hdc, &(polydraw_pts[15]), &(polydraw_tps[15]), 4); + todo_wine + expect(FALSE, retb); + /* bad point type, cursor position is moved, but back to its original spot */ + retb = PolyDraw(hdc, &(polydraw_pts[17]), &(polydraw_tps[17]), 4); + expect(FALSE, retb); + /* does lineto or moveto take precedence? */ + retb = PolyDraw(hdc, &(polydraw_pts[20]), &(polydraw_tps[20]), 3); + expect(TRUE, retb); + + EndPath(hdc); + ok_path(hdc, "polydraw_path", polydraw_path, sizeof(polydraw_path)/sizeof(path_test_t), 1); +done: + ReleaseDC(0, hdc); +} + START_TEST(path) { test_widenpath(); test_arcto(); test_anglearc(); + test_polydraw(); }
1
0
0
0
Alexandre Julliard : winealsa: Make sure we can set volume before reporting WAVECAPS_VOLUME.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: edff53387a2186a51834c7b03d48307b9e335293 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edff53387a2186a51834c7b03…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 17 13:35:53 2007 +0200 winealsa: Make sure we can set volume before reporting WAVECAPS_VOLUME. --- dlls/winealsa.drv/waveinit.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c index 11f8fdd..a19e332 100644 --- a/dlls/winealsa.drv/waveinit.c +++ b/dlls/winealsa.drv/waveinit.c @@ -307,10 +307,22 @@ static int ALSA_ComputeCaps(snd_ctl_t *ctl, snd_pcm_t *pcm, /* check for volume control support */ if (ctl) { - *supports |= WAVECAPS_VOLUME; - - if (chmin <= 2 && 2 <= chmax) - *supports |= WAVECAPS_LRVOLUME; + if (snd_ctl_name(ctl)) + { + snd_hctl_t *hctl; + if (snd_hctl_open(&hctl, snd_ctl_name(ctl), 0) >= 0) + { + snd_hctl_load(hctl); + if (!ALSA_CheckSetVolume( hctl, NULL, NULL, NULL, NULL, NULL, NULL, NULL )) + { + *supports |= WAVECAPS_VOLUME; + if (chmin <= 2 && 2 <= chmax) + *supports |= WAVECAPS_LRVOLUME; + } + snd_hctl_free(hctl); + snd_hctl_close(hctl); + } + } } if (*formats & (WAVE_FORMAT_1M08 | WAVE_FORMAT_2M08 |
1
0
0
0
James Hawkins : vdmdbg: Add a stub implementation of VDMEnumTaskWOW.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: f2fc4d3a0f98754ac258d1e447f06d91c070cc07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2fc4d3a0f98754ac258d1e44…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Jul 16 19:42:48 2007 -0700 vdmdbg: Add a stub implementation of VDMEnumTaskWOW. --- dlls/vdmdbg/vdmdbg.c | 14 ++++++++++++++ dlls/vdmdbg/vdmdbg.spec | 2 +- include/Makefile.in | 1 + include/vdmdbg.h | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletions(-) diff --git a/dlls/vdmdbg/vdmdbg.c b/dlls/vdmdbg/vdmdbg.c index 2c215e3..549b638 100644 --- a/dlls/vdmdbg/vdmdbg.c +++ b/dlls/vdmdbg/vdmdbg.c @@ -19,6 +19,20 @@ #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "vdmdbg.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vdmdbg); + +/*********************************************************************** + * VDMEnumTaskWOW (VDMDBG.@) + */ +INT WINAPI VDMEnumTaskWOW(DWORD dwProcessId, TASKENUMPROC fp, LPARAM lparam) +{ + FIXME("(%d, %p): stub!\n", dwProcessId, fp); + return 0; +} /*********************************************************************** * DllMain (VDMDBG.@) diff --git a/dlls/vdmdbg/vdmdbg.spec b/dlls/vdmdbg/vdmdbg.spec index d129a05..4131271 100644 --- a/dlls/vdmdbg/vdmdbg.spec +++ b/dlls/vdmdbg/vdmdbg.spec @@ -3,7 +3,7 @@ @ stub VDMBreakThread @ stub VDMDetectWOW @ stub VDMEnumProcessWOW -@ stub VDMEnumTaskWOW +@ stdcall VDMEnumTaskWOW(long ptr long) @ stub VDMEnumTaskWOWEx @ stub VDMGetModuleSelector @ stub VDMGetPointer diff --git a/include/Makefile.in b/include/Makefile.in index 2ffe4b9..782e671 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -341,6 +341,7 @@ SRCDIR_INCLUDES = \ usp10.h \ uuids.h \ uxtheme.h \ + vdmdbg.h \ ver.h \ vfw.h \ vfwmsgs.h \ diff --git a/include/vdmdbg.h b/include/vdmdbg.h new file mode 100644 index 0000000..d6ebf30 --- /dev/null +++ b/include/vdmdbg.h @@ -0,0 +1,36 @@ +/* + * VDMDBG definitions + * + * Copyright (C) 2007 James Hawkins + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_VDMDBG_H +#define __WINE_VDMDBG_H + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +typedef BOOL (WINAPI *TASKENUMPROC)(DWORD, WORD, WORD, LPARAM); + +INT WINAPI VDMEnumTaskWOW(DWORD, TASKENUMPROC, LPARAM); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_VDMDBG_H */
1
0
0
0
Kovács András : include: Add some idl headers for d3d10.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: 9b37d6f0ee1ad324cc038008031b7536e45bdc2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b37d6f0ee1ad324cc0380080…
Author: Kovács András <andras(a)csevego.net> Date: Fri Jul 13 22:38:59 2007 +0200 include: Add some idl headers for d3d10. --- .gitignore | 3 + include/Makefile.in | 3 + include/d3d10.idl | 1539 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/dxgi.idl | 19 + include/dxgitype.idl | 117 ++++ 5 files changed, 1681 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9b37d6f0ee1ad324cc038…
1
0
0
0
Alexandre Julliard : widl: Added support for floating-point constants.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: 40dda77c52132c82557b31205a2d6f1a47f732e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40dda77c52132c82557b31205…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 17 13:09:03 2007 +0200 widl: Added support for floating-point constants. --- tools/widl/header.c | 3 +++ tools/widl/parser.l | 5 +++++ tools/widl/parser.y | 15 +++++++++++++++ tools/widl/typegen.c | 5 +++++ tools/widl/widltypes.h | 2 ++ 5 files changed, 30 insertions(+), 0 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index 6f2da32..c04222b 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -358,6 +358,9 @@ void write_expr(FILE *h, const expr_t *e, int brackets) case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval); break; + case EXPR_DOUBLE: + fprintf(h, "%#.15g", e->u.dval); + break; case EXPR_TRUEFALSE: if (e->u.lval == 0) fprintf(h, "FALSE"); diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 7ddcedd..4cd98bb 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -29,6 +29,7 @@ int [0-9]+ hexd [0-9a-fA-F] hex 0x{hexd}+ uuid {hexd}{8}-{hexd}{4}-{hexd}{4}-{hexd}{4}-{hexd}{12} +double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* %x QUOTE %x ATTR @@ -150,6 +151,10 @@ static UUID* parse_uuid(const char*u) parser_lval.num = strtoul(yytext, NULL, 0); return aNUM; } +<INITIAL>{double} { + parser_lval.dbl = strtod(yytext, NULL); + return aDOUBLE; + } SAFEARRAY{ws}*/\( return tSAFEARRAY; {cident} return kw_token(yytext); <INITIAL,ATTR>\n line_number++; diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 4933c43..5b4c5ff 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -83,6 +83,7 @@ static attr_t *make_attrv(enum attr_type type, unsigned long val); static attr_t *make_attrp(enum attr_type type, void *val); static expr_t *make_expr(enum expr_type type); static expr_t *make_exprl(enum expr_type type, long val); +static expr_t *make_exprd(enum expr_type type, double val); static expr_t *make_exprs(enum expr_type type, char *val); static expr_t *make_exprt(enum expr_type type, type_t *tref, expr_t *expr); static expr_t *make_expr1(enum expr_type type, expr_t *expr); @@ -151,11 +152,13 @@ static void check_all_user_types(ifref_list_t *ifaces); char *str; UUID *uuid; unsigned int num; + double dbl; } %token <str> aIDENTIFIER %token <str> aKNOWNTYPE %token <num> aNUM aHEXNUM +%token <dbl> aDOUBLE %token <str> aSTRING %token <uuid> aUUID %token aEOF @@ -581,6 +584,7 @@ m_expr: { $$ = make_expr(EXPR_VOID); } expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } | aHEXNUM { $$ = make_exprl(EXPR_HEXNUM, $1); } + | aDOUBLE { $$ = make_exprd(EXPR_DOUBLE, $1); } | tFALSE { $$ = make_exprl(EXPR_TRUEFALSE, 0); } | tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); } | aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); } @@ -1033,6 +1037,17 @@ static expr_t *make_exprl(enum expr_type type, long val) return e; } +static expr_t *make_exprd(enum expr_type type, double val) +{ + expr_t *e = xmalloc(sizeof(expr_t)); + e->type = type; + e->ref = NULL; + e->u.dval = val; + e->is_const = TRUE; + e->cval = val; + return e; +} + static expr_t *make_exprs(enum expr_type type, char *val) { expr_t *e; diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index e8f6d1f..73a3622 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -227,6 +227,8 @@ static int compare_expr(const expr_t *a, const expr_t *b) case EXPR_HEXNUM: case EXPR_TRUEFALSE: return a->u.lval - b->u.lval; + case EXPR_DOUBLE: + return a->u.dval - b->u.dval; case EXPR_IDENTIFIER: return strcmp(a->u.sval, b->u.sval); case EXPR_COND: @@ -2690,6 +2692,9 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets, case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval); break; + case EXPR_DOUBLE: + fprintf(h, "%#.15g", e->u.dval); + break; case EXPR_TRUEFALSE: if (e->u.lval == 0) fprintf(h, "FALSE"); diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 6235620..d514d54 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -135,6 +135,7 @@ enum expr_type EXPR_VOID, EXPR_NUM, EXPR_HEXNUM, + EXPR_DOUBLE, EXPR_IDENTIFIER, EXPR_NEG, EXPR_NOT, @@ -188,6 +189,7 @@ struct _expr_t { const expr_t *ref; union { long lval; + double dval; const char *sval; const expr_t *ext; type_t *tref;
1
0
0
0
Evan Stade : gdiplus: Added GdipAddPathBeziers.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: 7e1917852968c61f964d055fa1c69df55ab222d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e1917852968c61f964d055fa…
Author: Evan Stade <estade(a)gmail.com> Date: Mon Jul 16 19:45:19 2007 -0700 gdiplus: Added GdipAddPathBeziers. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 27 +++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 81e5940..cc64b98 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -2,7 +2,7 @@ @ stub GdipAddPathArcI @ stub GdipAddPathBezier @ stub GdipAddPathBezierI -@ stub GdipAddPathBeziers +@ stdcall GdipAddPathBeziers(ptr ptr long) @ stub GdipAddPathBeziersI @ stub GdipAddPathClosedCurve2 @ stub GdipAddPathClosedCurve2I diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5b0e502..d059482 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -94,6 +94,33 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, + INT count) +{ + INT i, old_count; + + if(!path || !points || ((count - 1) % 3)) + return InvalidParameter; + + if(!lengthen_path(path, count)) + return OutOfMemory; + + old_count = path->pathdata.Count; + + for(i = 0; i < count; i++){ + path->pathdata.Points[old_count + i].X = points[i].X; + path->pathdata.Points[old_count + i].Y = points[i].Y; + path->pathdata.Types[old_count + i] = PathPointTypeBezier; + } + + path->pathdata.Types[old_count] = + (path->newfigure ? PathPointTypeStart : PathPointTypeLine); + path->newfigure = FALSE; + path->pathdata.Count += count; + + return Ok; +} + GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 35a6058..fb760f0 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -65,6 +65,7 @@ GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
1
0
0
0
Evan Stade : gdiplus: Added GdipSetPenDashStyle.
by Alexandre Julliard
17 Jul '07
17 Jul '07
Module: wine Branch: master Commit: daf00ab72a2b2e3a3a87f93ea312133ab4ab4ce9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=daf00ab72a2b2e3a3a87f93ea…
Author: Evan Stade <estade(a)gmail.com> Date: Mon Jul 16 19:45:16 2007 -0700 gdiplus: Added GdipSetPenDashStyle. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/gdiplus_private.h | 3 +- dlls/gdiplus/pen.c | 44 ++++++++++++++++++++++++++++++++++++++++ include/gdiplusenums.h | 11 ++++++++++ include/gdiplusflat.h | 1 + include/gdiplusgpstubs.h | 1 + 6 files changed, 60 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index aea3a72..81e5940 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -549,7 +549,7 @@ @ stub GdipSetPenDashArray @ stub GdipSetPenDashCap197819 @ stub GdipSetPenDashOffset -@ stub GdipSetPenDashStyle +@ stdcall GdipSetPenDashStyle(ptr long) @ stdcall GdipSetPenEndCap(ptr long) @ stdcall GdipSetPenLineCap197819(ptr long long long) @ stdcall GdipSetPenLineJoin(ptr long) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index b0a9dd1..299806b 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -23,7 +23,7 @@ #include "windef.h" #include "gdiplus.h" -#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_ENDCAP_FLAT | PS_JOIN_MITER) +#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER) #define MAX_ARC_PTS (13) COLORREF ARGB2COLORREF(ARGB color); @@ -51,6 +51,7 @@ struct GpPen{ GpDashCap dashcap; GpLineJoin join; REAL miterlimit; + GpDashStyle dash; }; struct GpGraphics{ diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 1b37e13..53559bd 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -27,6 +27,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); +static DWORD gdip_to_gdi_dash(GpDashStyle dash) +{ + switch(dash){ + case DashStyleSolid: + return PS_SOLID; + case DashStyleDash: + return PS_DASH; + case DashStyleDot: + return PS_DOT; + case DashStyleDashDot: + return PS_DASHDOT; + case DashStyleDashDotDot: + return PS_DASHDOTDOT; + case DashStyleCustom: + FIXME("DashStyleCustom not implemented\n"); + return PS_SOLID; + default: + ERR("Not a member of GpDashStyle enumeration\n"); + return 0; + } +} + static DWORD gdip_to_gdi_join(GpLineJoin join) { switch(join){ @@ -91,6 +113,28 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen) return Ok; } +GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash) +{ + LOGBRUSH lb; + + if(!pen) + return InvalidParameter; + + DeleteObject(pen->gdipen); + pen->dash = dash; + pen->style &= ~(PS_ALTERNATE | PS_SOLID | PS_DASH | PS_DOT | PS_DASHDOT | + PS_DASHDOTDOT | PS_NULL | PS_USERSTYLE | PS_INSIDEFRAME); + pen->style |= gdip_to_gdi_dash(dash); + + lb.lbStyle = BS_SOLID; + lb.lbColor = pen->color; + lb.lbHatch = 0; + + pen->gdipen = ExtCreatePen(pen->style, (INT) pen->width, &lb, 0, NULL); + + return Ok; +} + GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap) { if(!pen) return InvalidParameter; diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index 7bf5eb6..4f5b193 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -141,6 +141,16 @@ enum DashCap DashCapTriangle = 3 }; +enum DashStyle +{ + DashStyleSolid, + DashStyleDash, + DashStyleDot, + DashStyleDashDot, + DashStyleDashDotDot, + DashStyleCustom +}; + #ifndef __cplusplus typedef enum Unit Unit; @@ -155,6 +165,7 @@ typedef enum CompositingQuality CompositingQuality; typedef enum InterpolationMode InterpolationMode; typedef enum PixelOffsetMode PixelOffsetMode; typedef enum DashCap DashCap; +typedef enum DashStyle DashStyle; #endif /* end of c typedefs */ diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index fa56952..35a6058 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -29,6 +29,7 @@ extern "C" { GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**); GpStatus WINGDIPAPI GdipDeletePen(GpPen*); +GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle); GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap); GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap); GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen*,GpLineJoin); diff --git a/include/gdiplusgpstubs.h b/include/gdiplusgpstubs.h index e847e0e..7cb1888 100644 --- a/include/gdiplusgpstubs.h +++ b/include/gdiplusgpstubs.h @@ -51,5 +51,6 @@ typedef LineCap GpLineCap; typedef RectF GpRectF; typedef LineJoin GpLineJoin; typedef DashCap GpDashCap; +typedef DashStyle GpDashStyle; #endif
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
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