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
May 2006
----- 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
863 discussions
Start a n
N
ew thread
Phil Costin : wined3d: Check registry for UseGLSL enabled.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 1b320431b8aed7894f19a5625517b1e80fbcdefa URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1b320431b8aed7894f19a56…
Author: Phil Costin <philcostin(a)hotmail.com> Date: Thu May 18 02:24:08 2006 +0100 wined3d: Check registry for UseGLSL enabled. --- dlls/wined3d/directx.c | 16 ++++++++-------- dlls/wined3d/wined3d_main.c | 17 ++++++++++++++++- dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index ce05a45..c870942 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1677,15 +1677,15 @@ #endif *pCaps->MaxStreams = MAX_STREAMS; *pCaps->MaxStreamStride = 1024; - if (wined3d_settings.vs_mode == VS_HW && GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && DeviceType != WINED3DDEVTYPE_REF) { - /* FIXME: Uncomment the line below and remove the line beneath that to set Vertex Shader 2.0+ capability */ - /* *pCaps->VertexShaderVersion = D3DVS_VERSION(3,0); */ - *pCaps->VertexShaderVersion = D3DVS_VERSION(1,1); + if (wined3d_settings.vs_mode == VS_HW && GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && + wined3d_settings.glslRequested && DeviceType != WINED3DDEVTYPE_REF) { + *pCaps->VertexShaderVersion = D3DVS_VERSION(3,0); TRACE_(d3d_caps)("Hardware Vertex Shaders versions 2.0+ enabled\n"); } else if (wined3d_settings.vs_mode == VS_HW && GL_SUPPORT(ARB_VERTEX_PROGRAM) && DeviceType != WINED3DDEVTYPE_REF) { *pCaps->VertexShaderVersion = D3DVS_VERSION(1,1); TRACE_(d3d_caps)("Hardware Vertex Shader version 1.1 enabled\n"); } else if (wined3d_settings.vs_mode == VS_SW || DeviceType == WINED3DDEVTYPE_REF) { + /* FIXME: Change the following line (when needed) to reflect the reported software vertex shader version implemented */ *pCaps->VertexShaderVersion = D3DVS_VERSION(1,1); TRACE_(d3d_caps)("Software Vertex Shader version 1.1 enabled\n"); } else { @@ -1699,10 +1699,10 @@ #endif *pCaps->MaxVertexShaderConst = WINED3D_VSHADER_MAX_CONSTANTS; } - if (wined3d_settings.ps_mode == PS_HW && GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && DeviceType != WINED3DDEVTYPE_REF) { - /* FIXME: Uncomment the following line and remove the line beneath that to set Pixel Shader 2.0+ capability */ - /* *pCaps->PixelShaderVersion = D3DPS_VERSION(3,0); */ - *pCaps->PixelShaderVersion = D3DPS_VERSION(1,4); + if (wined3d_settings.ps_mode == PS_HW && GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && + wined3d_settings.glslRequested && DeviceType != WINED3DDEVTYPE_REF) { + *pCaps->PixelShaderVersion = D3DPS_VERSION(3,0); + /* FIXME: The following line is card dependant. -1.0 to 1.0 is a safe default clamp range for now */ *pCaps->PixelShader1xMaxValue = 1.0; TRACE_(d3d_caps)("Hardware Pixel Shaders versions 2.0+ enabled\n"); } else if (wined3d_settings.ps_mode == PS_HW && GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && DeviceType != WINED3DDEVTYPE_REF) { diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 339b871..ae7bac6 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -36,7 +36,8 @@ wined3d_settings_t wined3d_settings = { VS_HW, /* Hardware by default */ PS_NONE, /* Disabled by default */ - VBO_HW /* Hardware by default */ + VBO_HW, /* Hardware by default */ + FALSE /* Use of GLSL disabled by default */ }; WineD3DGlobalStatistics *wineD3DGlobalStatistics = NULL; @@ -168,6 +169,18 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, wined3d_settings.vbo_mode = VBO_HW; } } + if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) ) + { + if (!strcmp(buffer,"enabled")) + { + TRACE("Use of GL Shading Language enabled for systems that support it\n"); + wined3d_settings.glslRequested = TRUE; + } + else + { + TRACE("Use of GL Shading Language disabled\n"); + } + } if ( !get_config_key( hkey, appkey, "Nonpower2Mode", buffer, size) ) { if (!strcmp(buffer,"none")) @@ -190,6 +203,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, TRACE("Disable pixel shaders\n"); if (wined3d_settings.vbo_mode == VBO_NONE) TRACE("Disable Vertex Buffer Hardware support\n"); + if (wined3d_settings.glslRequested) + TRACE("If supported by your system, GL Shading Language will be used\n"); if (wined3d_settings.nonpower2_mode == NP2_REPACK) TRACE("Repacking non-power2 textures\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 6b90544..6754877 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -137,6 +137,7 @@ typedef struct wined3d_settings_s { int vs_mode; int ps_mode; int vbo_mode; + BOOL glslRequested; /* nonpower 2 function */ int nonpower2_mode; } wined3d_settings_t;
1
0
0
0
Mike McCormack : rpcrt4: Fix a possible memory leak, cleanup a bit.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: a45b16a460343695d5a5d91666d62f07e94fe35c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a45b16a460343695d5a5d91…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Thu May 18 19:07:38 2006 +0900 rpcrt4: Fix a possible memory leak, cleanup a bit. --- dlls/rpcrt4/rpc_binding.c | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 8e2c4bb..c3aebbd 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -261,14 +261,15 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding RPCRT4_CreateConnection(&NewConnection, Binding->server, Binding->Protseq, Binding->NetworkAddr, Binding->Endpoint, NULL, Binding->AuthInfo, Binding); - *Connection = NewConnection; status = RPCRT4_OpenConnection(NewConnection); - if (status != RPC_S_OK) { + if (status != RPC_S_OK) + { + RPCRT4_DestroyConnection(NewConnection); return status; } - + /* we need to send a binding packet if we are client. */ - if (!(*Connection)->server) { + if (!NewConnection->server) { RpcPktHdr *hdr; RpcPktHdr *response_hdr; RPC_MESSAGE msg; @@ -279,17 +280,17 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, InterfaceId, TransferSyntax); - status = RPCRT4_Send(*Connection, hdr, NULL, 0); + status = RPCRT4_Send(NewConnection, hdr, NULL, 0); RPCRT4_FreeHeader(hdr); if (status != RPC_S_OK) { - RPCRT4_DestroyConnection(*Connection); + RPCRT4_DestroyConnection(NewConnection); return status; } status = RPCRT4_Receive(NewConnection, &response_hdr, &msg); if (status != RPC_S_OK) { ERR("receive failed\n"); - RPCRT4_DestroyConnection(*Connection); + RPCRT4_DestroyConnection(NewConnection); return status; } @@ -297,17 +298,19 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding response_hdr->bind_ack.max_tsize < RPC_MIN_PACKET_SIZE) { ERR("failed to bind\n"); RPCRT4_FreeHeader(response_hdr); - RPCRT4_DestroyConnection(*Connection); + RPCRT4_DestroyConnection(NewConnection); return RPC_S_PROTOCOL_ERROR; } /* FIXME: do more checks? */ - (*Connection)->MaxTransmissionSize = response_hdr->bind_ack.max_tsize; - (*Connection)->ActiveInterface = *InterfaceId; + NewConnection->MaxTransmissionSize = response_hdr->bind_ack.max_tsize; + NewConnection->ActiveInterface = *InterfaceId; RPCRT4_FreeHeader(response_hdr); } - Binding->FromConn = *Connection; + + Binding->FromConn = NewConnection; + *Connection = NewConnection; return RPC_S_OK; }
1
0
0
0
Mike McCormack : rpcrt4: Fix and test RpcNetworkIsProtseqValid.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: c3a08421a2285542223a00f047a98625d6f7bce0 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c3a08421a2285542223a00f…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Thu May 18 19:06:30 2006 +0900 rpcrt4: Fix and test RpcNetworkIsProtseqValid. --- dlls/rpcrt4/rpc_binding.c | 43 ------------------------------------------- dlls/rpcrt4/rpc_transport.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/rpcrt4/tests/rpc.c | 12 ++++++++++++ 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 631d46e..8e2c4bb 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -835,49 +835,6 @@ RPC_STATUS WINAPI I_RpcBindingSetAsync( } /*********************************************************************** - * RpcNetworkIsProtseqValidA (RPCRT4.@) - */ -RPC_STATUS WINAPI RpcNetworkIsProtseqValidA(unsigned char *protseq) { - UNICODE_STRING protseqW; - - if (!protseq) return RPC_S_INVALID_RPC_PROTSEQ; /* ? */ - - if (RtlCreateUnicodeStringFromAsciiz(&protseqW, (char*)protseq)) { - RPC_STATUS ret = RpcNetworkIsProtseqValidW(protseqW.Buffer); - RtlFreeUnicodeString(&protseqW); - return ret; - } else return RPC_S_OUT_OF_MEMORY; -} - -/*********************************************************************** - * RpcNetworkIsProtseqValidW (RPCRT4.@) - * - * Checks if the given protocol sequence is known by the RPC system. - * If it is, returns RPC_S_OK, otherwise RPC_S_PROTSEQ_NOT_SUPPORTED. - * - * We currently support: - * ncalrpc local-only rpc over LPC (LPC is not really used) - * ncacn_np rpc over named pipes - */ -RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(LPWSTR protseq) { - static const WCHAR protseqsW[][15] = { - {'n','c','a','l','r','p','c',0}, - {'n','c','a','c','n','_','n','p',0} - }; - static const int count = sizeof(protseqsW) / sizeof(protseqsW[0]); - int i; - - if (!protseq) return RPC_S_INVALID_RPC_PROTSEQ; /* ? */ - - for (i = 0; i < count; i++) { - if (!strcmpW(protseq, protseqsW[i])) return RPC_S_OK; - } - - FIXME("Unknown protseq %s - we probably need to implement it one day\n", debugstr_w(protseq)); - return RPC_S_PROTSEQ_NOT_SUPPORTED; -} - -/*********************************************************************** * RpcImpersonateClient (RPCRT4.@) * * Impersonates the client connected via a binding handle so that security diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index ba4e8d3..9758b6c 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -488,3 +488,40 @@ RPC_STATUS RPCRT4_DestroyConnection(RpcC HeapFree(GetProcessHeap(), 0, Connection); return RPC_S_OK; } + +/*********************************************************************** + * RpcNetworkIsProtseqValidW (RPCRT4.@) + * + * Checks if the given protocol sequence is known by the RPC system. + * If it is, returns RPC_S_OK, otherwise RPC_S_PROTSEQ_NOT_SUPPORTED. + * + */ +RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(LPWSTR protseq) +{ + char ps[0x10]; + + WideCharToMultiByte(CP_ACP, 0, protseq, -1, + ps, sizeof ps, NULL, NULL); + if (rpcrt4_get_protseq_ops(ps)) + return RPC_S_OK; + + FIXME("Unknown protseq %s\n", debugstr_w(protseq)); + + return RPC_S_INVALID_RPC_PROTSEQ; +} + +/*********************************************************************** + * RpcNetworkIsProtseqValidA (RPCRT4.@) + */ +RPC_STATUS WINAPI RpcNetworkIsProtseqValidA(unsigned char *protseq) +{ + UNICODE_STRING protseqW; + + if (RtlCreateUnicodeStringFromAsciiz(&protseqW, (char*)protseq)) + { + RPC_STATUS ret = RpcNetworkIsProtseqValidW(protseqW.Buffer); + RtlFreeUnicodeString(&protseqW); + return ret; + } + return RPC_S_OUT_OF_MEMORY; +} diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index ce53471..fc0c922 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -165,10 +165,22 @@ static void TestDceErrorInqText (void) ok (0, "Cannot set up for DceErrorInqText\n"); } +static void test_rpc_ncacn_ip_tcp(void) +{ + RPC_STATUS status; + + status = RpcNetworkIsProtseqValid((unsigned char*)"foo"); + ok(status == RPC_S_INVALID_RPC_PROTSEQ, "return wrong\n"); + + status = RpcNetworkIsProtseqValid((unsigned char*)"ncacn_ip_tcp"); + ok(status == RPC_S_OK, "return wrong\n"); +} + START_TEST( rpc ) { trace ( " ** Uuid Conversion and Comparison Tests **\n" ); UuidConversionAndComparison(); trace ( " ** DceErrorInqText **\n"); TestDceErrorInqText(); + test_rpc_ncacn_ip_tcp(); }
1
0
0
0
Mike McCormack : rpcrt4: Add a stub implementation for RpcMgmtIsServerListening.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 0f8f927aedddf18343483138a18d9e71337ea69c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0f8f927aedddf1834348313…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Thu May 18 19:06:15 2006 +0900 rpcrt4: Add a stub implementation for RpcMgmtIsServerListening. --- dlls/rpcrt4/rpc_server.c | 9 +++++++++ dlls/rpcrt4/rpcrt4.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index e9a6da6..2af96be 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -1090,3 +1090,12 @@ RPC_STATUS WINAPI RpcMgmtEpEltInqBegin(R Binding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext); return RPC_S_INVALID_BINDING; } + +/*********************************************************************** + * RpcMgmtEpEltInqBegin (RPCRT4.@) + */ +RPC_STATUS WINAPI RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding) +{ + FIXME("(%p): stub\n", Binding); + return RPC_S_INVALID_BINDING; +} diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index 8034f22..5d35096 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -436,7 +436,7 @@ # 9x version of I_RpcBindingSetAsync has @ stub RpcMgmtInqServerPrincNameA @ stub RpcMgmtInqServerPrincNameW @ stub RpcMgmtInqStats -@ stub RpcMgmtIsServerListening +@ stdcall RpcMgmtIsServerListening(ptr) @ stub RpcMgmtSetAuthorizationFn @ stub RpcMgmtSetCancelTimeout @ stub RpcMgmtSetComTimeout
1
0
0
0
Alexandre Julliard : user: Fixed a broken trace in the dialog test.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: c16ca7221004554c1db1829d1ad58cbe4ea66590 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c16ca7221004554c1db1829…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 16:32:49 2006 +0200 user: Fixed a broken trace in the dialog test. --- dlls/user/tests/dialog.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user/tests/dialog.c b/dlls/user/tests/dialog.c index d55eef4..dea1826 100644 --- a/dlls/user/tests/dialog.c +++ b/dlls/user/tests/dialog.c @@ -194,7 +194,7 @@ static BOOL CreateWindows (HINSTANCE hin { style = GetWindowLong (hwnd[p->id], GWL_STYLE); exstyle = GetWindowLong (hwnd[p->id], GWL_EXSTYLE); - if (style == p->style && exstyle == p->exstyle) + if (style != p->style || exstyle != p->exstyle) { trace ("Style mismatch at %d: %8.8lx %8.8lx cf %8.8lx %8.8lx\n", p->id, style, exstyle, p->style, p->exstyle); }
1
0
0
0
Alexandre Julliard : user: Added helper functions for A<-> W conversion of single characters.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 2ff505c2cf8bd2e61552b92b1ac578ad5e8e1a48 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=2ff505c2cf8bd2e61552b92…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 16:31:36 2006 +0200 user: Added helper functions for A<->W conversion of single characters. --- dlls/user/winproc.c | 113 ++++++++++++++++++--------------------------------- 1 files changed, 40 insertions(+), 73 deletions(-) diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index 26c84fe..7746135 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -381,6 +381,32 @@ static void MDICREATESTRUCT16to32A( cons to->lParam = from->lParam; } +static WPARAM map_wparam_char_AtoW( WPARAM wParam, DWORD len ) +{ + CHAR ch[2]; + WCHAR wch; + + ch[0] = (wParam >> 8); + ch[1] = wParam & 0xff; + if (len > 1 && ch[0]) + RtlMultiByteToUnicodeN( &wch, sizeof(wch), NULL, ch, 2 ); + else + RtlMultiByteToUnicodeN( &wch, sizeof(wch), NULL, ch + 1, 1 ); + return MAKEWPARAM( wch, HIWORD(wParam) ); +} + +static WPARAM map_wparam_char_WtoA( WPARAM wParam, DWORD len ) +{ + WCHAR wch = wParam; + BYTE ch[2]; + + RtlUnicodeToMultiByteN( (LPSTR)ch, len, &len, &wch, sizeof(wch) ); + if (len == 2) + return MAKEWPARAM( (ch[0] << 8) | ch[1], HIWORD(wParam) ); + else + return MAKEWPARAM( ch[0], HIWORD(wParam) ); +} + /********************************************************************** * WINPROC_CallWndProc32 * @@ -763,26 +789,11 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, U case WM_SYSCHAR: case WM_SYSDEADCHAR: case EM_SETPASSWORDCHAR: - { - CHAR ch = LOWORD(*pwparam); - WCHAR wch; - MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wch, 1); - *pwparam = MAKEWPARAM( wch, HIWORD(*pwparam) ); - } + *pwparam = map_wparam_char_AtoW( *pwparam, 1 ); return 0; case WM_IME_CHAR: - { - CHAR ch[2]; - WCHAR wch; - ch[0] = (*pwparam >> 8); - ch[1] = *pwparam & 0xff; - if (ch[0]) - MultiByteToWideChar(CP_ACP, 0, ch, 2, &wch, 1); - else - MultiByteToWideChar(CP_ACP, 0, &ch[1], 1, &wch, 1); - *pwparam = MAKEWPARAM( wch, HIWORD(*pwparam) ); - } + *pwparam = map_wparam_char_AtoW( *pwparam, 2 ); return 0; case WM_PAINTCLIPBOARD: @@ -1429,9 +1440,6 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND hw INT WINPROC_MapMsg16To32W( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32, WPARAM *pwparam32, LPARAM *plparam ) { - CHAR ch; - WCHAR wch; - *pmsg32=(UINT)msg16; *pwparam32 = (WPARAM)wParam16; switch(msg16) @@ -1509,9 +1517,7 @@ INT WINPROC_MapMsg16To32W( HWND hwnd, UI case WM_DEADCHAR: case WM_SYSCHAR: case WM_SYSDEADCHAR: - ch = msg16->wParam; - MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1); - msg32->wParam = wch; + msg32->wParam = map_wparam_char_AtoW( msg16->wParam, 1 ); break; } *plparam = (LPARAM)msg32; @@ -1520,27 +1526,22 @@ INT WINPROC_MapMsg16To32W( HWND hwnd, UI else return 0; case WM_CHARTOITEM: - ch = wParam16; - MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1); - *pwparam32 = MAKEWPARAM( wch, HIWORD(*plparam) ); + *pwparam32 = MAKEWPARAM( map_wparam_char_AtoW( wParam16, 1 ), HIWORD(*plparam) ); *plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) ); return 0; case WM_MENUCHAR: - ch = wParam16; - MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1); - *pwparam32 = MAKEWPARAM( wch, LOWORD(*plparam) ); + *pwparam32 = MAKEWPARAM( map_wparam_char_AtoW( wParam16, 1 ), LOWORD(*plparam) ); *plparam = (LPARAM)HMENU_32(HIWORD(*plparam)); return 0; case WM_CHAR: case WM_DEADCHAR: case WM_SYSCHAR: case WM_SYSDEADCHAR: - ch = wParam16; - MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1); - *pwparam32 = wch; + *pwparam32 = map_wparam_char_AtoW( wParam16, 1 ); return 0; case WM_IME_CHAR: - return WINPROC_MapMsg32ATo32W( hwnd, *pmsg32, pwparam32, plparam ); + *pwparam32 = map_wparam_char_AtoW( wParam16, 2 ); + return 0; default: /* No Unicode translation needed */ return WINPROC_MapMsg16To32A( hwnd, msg16, wParam16, pmsg32, @@ -2397,9 +2398,6 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UI UINT16 *pmsg16, WPARAM16 *pwparam16, LPARAM *plparam ) { - BYTE ch; - WCHAR wch; - *pmsg16 = LOWORD(msg32); *pwparam16 = LOWORD(wParam32); switch(msg32) @@ -2483,35 +2481,21 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UI return 1; case WM_CHARTOITEM: - wch = LOWORD(wParam32); - WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)&ch, 1, NULL, NULL); - *pwparam16 = ch; + *pwparam16 = map_wparam_char_WtoA( wParam32, 1 ); *plparam = MAKELPARAM( (HWND16)*plparam, HIWORD(wParam32) ); return 0; case WM_MENUCHAR: - wch = LOWORD(wParam32); - WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)&ch, 1, NULL, NULL); - *pwparam16 = ch; + *pwparam16 = map_wparam_char_WtoA( wParam32, 1 ); *plparam = MAKELPARAM( HIWORD(wParam32), (HMENU16)*plparam ); return 0; case WM_CHAR: case WM_DEADCHAR: case WM_SYSCHAR: case WM_SYSDEADCHAR: - wch = wParam32; - WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)&ch, 1, NULL, NULL); - *pwparam16 = ch; + *pwparam16 = map_wparam_char_WtoA( wParam32, 1 ); return 0; case WM_IME_CHAR: - { - BYTE ch[2]; - - wch = wParam32; - if (WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)ch, 2, NULL, NULL ) == 2) - *pwparam16 = (ch[0] << 8) | ch[1]; - else - *pwparam16 = ch[0]; - } + *pwparam16 = map_wparam_char_WtoA( wParam32, 2 ); return 0; default: /* No Unicode translation needed (?) */ @@ -2864,28 +2848,11 @@ static LRESULT WINPROC_CallProc32WTo32A( case WM_SYSCHAR: case WM_SYSDEADCHAR: case EM_SETPASSWORDCHAR: - { - WCHAR wch = LOWORD(wParam); - BYTE ch; - RtlUnicodeToMultiByteN( (LPSTR)&ch, 1, NULL, &wch, sizeof(WCHAR) ); - wParam = MAKEWPARAM( ch, HIWORD(wParam) ); - ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); - } + ret = WINPROC_CallWndProc( func, hwnd, msg, map_wparam_char_WtoA(wParam,1), lParam ); break; case WM_IME_CHAR: - { - WCHAR wch = LOWORD(wParam); - BYTE ch[2]; - DWORD len; - - RtlUnicodeToMultiByteN( (LPSTR)ch, 2, &len, &wch, sizeof(WCHAR) ); - if (len == 2) - wParam = MAKEWPARAM( (ch[0] << 8) | ch[1], HIWORD(wParam) ); - else - wParam = MAKEWPARAM( ch[0], HIWORD(wParam) ); - ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); - } + ret = WINPROC_CallWndProc( func, hwnd, msg, map_wparam_char_WtoA(wParam,2), lParam ); break; case WM_PAINTCLIPBOARD:
1
0
0
0
Alexandre Julliard : user: Simplify 16-bit mappings of the WM_GETDLGCODE message.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 3fe201c308f722076593e62b5b7998dc3ea5a1d7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3fe201c308f722076593e62…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 16:30:56 2006 +0200 user: Simplify 16-bit mappings of the WM_GETDLGCODE message. --- dlls/user/winproc.c | 48 ++++++++++++++++-------------------------------- 1 files changed, 16 insertions(+), 32 deletions(-) diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index 3111bb7..26c84fe 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -1205,17 +1205,12 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UI if (!msg32) return -1; msg32->hwnd = WIN_Handle32( msg16->hwnd ); + msg32->message = msg16->message; + msg32->wParam = msg16->wParam; msg32->lParam = msg16->lParam; msg32->time = msg16->time; msg32->pt.x = msg16->pt.x; msg32->pt.y = msg16->pt.y; - /* this is right, right? */ - if (WINPROC_MapMsg16To32A( msg32->hwnd, msg16->message,msg16->wParam, - &msg32->message,&msg32->wParam, - &msg32->lParam)<0) { - HeapFree( GetProcessHeap(), 0, msg32 ); - return -1; - } *plparam = (LPARAM)msg32; return 1; } @@ -1410,9 +1405,6 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND hw if (lParam) { LPMSG msg32 = (LPMSG)lParam; - - WINPROC_UnmapMsg16To32A( hwnd, msg32->message, msg32->wParam, msg32->lParam, - result); HeapFree( GetProcessHeap(), 0, msg32 ); } break; @@ -1505,16 +1497,22 @@ INT WINPROC_MapMsg16To32W( HWND hwnd, UI if (!msg32) return -1; msg32->hwnd = WIN_Handle32( msg16->hwnd ); + msg32->message = msg16->message; + msg32->wParam = msg16->wParam; msg32->lParam = msg16->lParam; msg32->time = msg16->time; msg32->pt.x = msg16->pt.x; msg32->pt.y = msg16->pt.y; - /* this is right, right? */ - if (WINPROC_MapMsg16To32W(hwnd, msg16->message,msg16->wParam, - &msg32->message,&msg32->wParam, - &msg32->lParam)<0) { - HeapFree( GetProcessHeap(), 0, msg32 ); - return -1; + switch(msg32->message) + { + case WM_CHAR: + case WM_DEADCHAR: + case WM_SYSCHAR: + case WM_SYSDEADCHAR: + ch = msg16->wParam; + MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1); + msg32->wParam = wch; + break; } *plparam = (LPARAM)msg32; return 1; @@ -1601,9 +1599,6 @@ LRESULT WINPROC_UnmapMsg16To32W( HWND hw if (lParam) { LPMSG msg32 = (LPMSG)lParam; - - WINPROC_UnmapMsg16To32W( hwnd, msg32->message, msg32->wParam, msg32->lParam, - result, dispatch ); HeapFree( GetProcessHeap(), 0, msg32 ); } break; @@ -2080,17 +2075,12 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UI if (!msg16) return -1; msg16->hwnd = HWND_16( msg32->hwnd ); + msg16->message = msg32->message; + msg16->wParam = msg32->wParam; msg16->lParam = msg32->lParam; msg16->time = msg32->time; msg16->pt.x = msg32->pt.x; msg16->pt.y = msg32->pt.y; - /* this is right, right? */ - if (WINPROC_MapMsg32ATo16(msg32->hwnd,msg32->message,msg32->wParam, - &msg16->message,&msg16->wParam, &msg16->lParam)<0) - { - HeapFree( GetProcessHeap(), 0, msg16 ); - return -1; - } *plparam = MapLS( msg16 ); return 1; } @@ -2381,13 +2371,7 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, if (p16->lParam) { LPMSG16 msg16 = MapSL(p16->lParam); - MSGPARAM16 msgp16; UnMapLS( p16->lParam ); - msgp16.wParam=msg16->wParam; - msgp16.lParam=msg16->lParam; - WINPROC_UnmapMsg32ATo16(((LPMSG)lParam)->hwnd, ((LPMSG)lParam)->message, - ((LPMSG)lParam)->wParam, ((LPMSG)lParam)->lParam, - &msgp16 ); HeapFree( GetProcessHeap(), 0, msg16 ); } break;
1
0
0
0
Alexandre Julliard : user: Unify the mapping of listbox and combobox messages.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 6efb68cb0e8e8371684bdceb0f7ba7dba83d889c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6efb68cb0e8e8371684bdce…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 12:43:40 2006 +0200 user: Unify the mapping of listbox and combobox messages. --- dlls/user/winproc.c | 164 ++++++++++++--------------------------------------- 1 files changed, 39 insertions(+), 125 deletions(-) diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index 7c82591..3111bb7 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -590,24 +590,17 @@ BOOL WINPROC_IsUnicode( WNDPROC proc, BO /********************************************************************** - * WINPROC_TestCBForStr - * - * Return TRUE if the lparam is a string - */ -inline static BOOL WINPROC_TestCBForStr( HWND hwnd ) -{ - DWORD style = GetWindowLongA( hwnd, GWL_STYLE ); - return (!(style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) || (style & CBS_HASSTRINGS)); -} -/********************************************************************** * WINPROC_TestLBForStr * * Return TRUE if the lparam is a string */ -inline static BOOL WINPROC_TestLBForStr( HWND hwnd ) +inline static BOOL WINPROC_TestLBForStr( HWND hwnd, UINT msg ) { DWORD style = GetWindowLongA( hwnd, GWL_STYLE ); - return (!(style & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) || (style & LBS_HASSTRINGS)); + if (msg <= CB_MSGMAX) + return (!(style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) || (style & CBS_HASSTRINGS)); + else + return (!(style & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) || (style & LBS_HASSTRINGS)); } /********************************************************************** @@ -721,39 +714,19 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, U } return 1; -/* Listbox */ +/* Listbox / Combobox */ case LB_ADDSTRING: case LB_INSERTSTRING: case LB_FINDSTRING: case LB_FINDSTRINGEXACT: case LB_SELECTSTRING: - if(!*plparam) return 0; - if ( WINPROC_TestLBForStr( hwnd )) - { - UNICODE_STRING usBuffer; - RtlCreateUnicodeStringFromAsciiz(&usBuffer,(LPCSTR)*plparam); - *plparam = (LPARAM)usBuffer.Buffer; - } - return (*plparam ? 1 : -1); - - case LB_GETTEXT: /* FIXME: fixed sized buffer */ - { if ( WINPROC_TestLBForStr( hwnd )) - { LPARAM *ptr = HeapAlloc( GetProcessHeap(), 0, 512 * sizeof(WCHAR) + sizeof(LPARAM) ); - if (!ptr) return -1; - *ptr++ = *plparam; /* Store previous lParam */ - *plparam = (LPARAM)ptr; - } - } - return 1; - -/* Combobox */ case CB_ADDSTRING: case CB_INSERTSTRING: case CB_FINDSTRINGEXACT: case CB_FINDSTRING: case CB_SELECTSTRING: if(!*plparam) return 0; - if ( WINPROC_TestCBForStr( hwnd )) + if ( WINPROC_TestLBForStr( hwnd, msg )) { UNICODE_STRING usBuffer; RtlCreateUnicodeStringFromAsciiz(&usBuffer,(LPCSTR)*plparam); @@ -761,13 +734,14 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, U } return (*plparam ? 1 : -1); - case CB_GETLBTEXT: /* FIXME: fixed sized buffer */ - { if ( WINPROC_TestCBForStr( hwnd )) - { LPARAM *ptr = HeapAlloc( GetProcessHeap(), 0, 512 * sizeof(WCHAR) + sizeof(LPARAM) ); + case LB_GETTEXT: /* FIXME: fixed sized buffer */ + case CB_GETLBTEXT: + if ( WINPROC_TestLBForStr( hwnd, msg )) + { + LPARAM *ptr = HeapAlloc( GetProcessHeap(), 0, 512 * sizeof(WCHAR) + sizeof(LPARAM) ); if (!ptr) return -1; *ptr++ = *plparam; /* Store previous lParam */ *plparam = (LPARAM)ptr; - } } return 1; @@ -920,48 +894,29 @@ LRESULT WINPROC_UnmapMsg32ATo32W( HWND h HeapFree( GetProcessHeap(), 0, (void *)lParam ); break; -/* Listbox */ +/* Listbox / Combobox */ case LB_ADDSTRING: case LB_INSERTSTRING: case LB_FINDSTRING: case LB_FINDSTRINGEXACT: case LB_SELECTSTRING: - if ( WINPROC_TestLBForStr( hwnd )) - HeapFree( GetProcessHeap(), 0, (void *)lParam ); - break; - - case LB_GETTEXT: - if ( WINPROC_TestLBForStr( hwnd )) - { - LPARAM *ptr = (LPARAM *)lParam - 1; - if (result >= 0) - result = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, - (LPSTR)*ptr, 0x7fffffff, NULL, NULL ) - 1; - HeapFree( GetProcessHeap(), 0, ptr ); - } - break; - -/* Combobox */ case CB_ADDSTRING: case CB_INSERTSTRING: case CB_FINDSTRING: case CB_FINDSTRINGEXACT: case CB_SELECTSTRING: - if ( WINPROC_TestCBForStr( hwnd )) + if ( WINPROC_TestLBForStr( hwnd, msg )) HeapFree( GetProcessHeap(), 0, (void *)lParam ); break; + case LB_GETTEXT: case CB_GETLBTEXT: - if ( result < 0) /* CB_ERR and CB_ERRSPACE */ + if ( WINPROC_TestLBForStr( hwnd, msg )) { LPARAM *ptr = (LPARAM *)lParam - 1; - HeapFree( GetProcessHeap(), 0, ptr ); - } - else if ( WINPROC_TestCBForStr( hwnd )) - { - LPARAM *ptr = (LPARAM *)lParam - 1; - result = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, - (LPSTR)*ptr, 0x7fffffff, NULL, NULL ) - 1; + if (result >= 0) + result = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, + (LPSTR)*ptr, 0x7fffffff, NULL, NULL ) - 1; HeapFree( GetProcessHeap(), 0, ptr ); } break; @@ -2533,20 +2488,12 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UI *plparam = map_str_32W_to_16( (LPWSTR)*plparam ); return 1; case LB_GETTEXT: - if ( WINPROC_TestLBForStr( hwnd )) - { - LPSTR str = HeapAlloc( GetProcessHeap(), 0, 512 ); /* FIXME: fixed sized buffer */ - if (!str) return -1; - *pmsg16 = LB_GETTEXT16; - *plparam = (LPARAM)MapLS(str); - } - return 1; case CB_GETLBTEXT: - if ( WINPROC_TestCBForStr( hwnd )) + if ( WINPROC_TestLBForStr( hwnd, msg32 )) { LPSTR str = HeapAlloc( GetProcessHeap(), 0, 512 ); /* FIXME: fixed sized buffer */ if (!str) return -1; - *pmsg16 = CB_GETLBTEXT16; + *pmsg16 = (msg32 == LB_GETTEXT) ? LB_GETTEXT16 : CB_GETLBTEXT16; *plparam = (LPARAM)MapLS(str); } return 1; @@ -2658,16 +2605,8 @@ void WINPROC_UnmapMsg32WTo16( HWND hwnd, } break; case LB_GETTEXT: - if ( WINPROC_TestLBForStr( hwnd )) - { - LPSTR str = MapSL(p16->lParam); - UnMapLS( p16->lParam ); - p16->lResult = MultiByteToWideChar( CP_ACP, 0, str, -1, (LPWSTR)lParam, 0x7fffffff ) - 1; - HeapFree( GetProcessHeap(), 0, (LPARAM *)str ); - } - break; case CB_GETLBTEXT: - if ( WINPROC_TestCBForStr( hwnd )) + if ( WINPROC_TestLBForStr( hwnd, msg )) { LPSTR str = MapSL(p16->lParam); UnMapLS( p16->lParam ); @@ -2814,6 +2753,22 @@ static LRESULT WINPROC_CallProc32WTo32A( } break; + case LB_ADDSTRING: + case LB_INSERTSTRING: + case LB_FINDSTRING: + case LB_FINDSTRINGEXACT: + case LB_SELECTSTRING: + case CB_ADDSTRING: + case CB_INSERTSTRING: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_SELECTSTRING: + if (!lParam || !WINPROC_TestLBForStr( hwnd, msg )) + { + ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); + break; + } + /* fall through */ case WM_SETTEXT: case WM_WININICHANGE: case WM_DEVMODECHANGE: @@ -2821,7 +2776,6 @@ static LRESULT WINPROC_CallProc32WTo32A( case LB_DIR: case LB_ADDFILE: case EM_REPLACESEL: - handle_wm_settext: if (!lParam) ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); else { @@ -2876,48 +2830,9 @@ static LRESULT WINPROC_CallProc32WTo32A( } break; -/* Listbox */ - case LB_ADDSTRING: - case LB_INSERTSTRING: - case LB_FINDSTRING: - case LB_FINDSTRINGEXACT: - case LB_SELECTSTRING: - if (lParam && WINPROC_TestLBForStr( hwnd )) goto handle_wm_settext; - ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); - break; - case LB_GETTEXT: - if (lParam && WINPROC_TestLBForStr( hwnd )) - { - char buffer[512]; /* FIXME: fixed sized buffer */ - LRESULT result; - - ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, (LPARAM)buffer ); - result = dialog ? GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ) : ret; - if (result >= 0) - { - DWORD len; - RtlMultiByteToUnicodeN( (LPWSTR)lParam, ~0u, &len, buffer, strlen(buffer) + 1 ); - result = len / sizeof(WCHAR) - 1; - if (dialog) SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, result ); - else ret = result; - } - } - else ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); - break; - -/* Combobox */ - case CB_ADDSTRING: - case CB_INSERTSTRING: - case CB_FINDSTRING: - case CB_FINDSTRINGEXACT: - case CB_SELECTSTRING: - if (lParam && WINPROC_TestCBForStr( hwnd )) goto handle_wm_settext; - ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); - break; - case CB_GETLBTEXT: - if (lParam && WINPROC_TestCBForStr( hwnd )) + if (lParam && WINPROC_TestLBForStr( hwnd, msg )) { char buffer[512]; /* FIXME: fixed sized buffer */ LRESULT result; @@ -2936,7 +2851,6 @@ static LRESULT WINPROC_CallProc32WTo32A( else ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); break; -/* Multiline edit */ case EM_GETLINE: { char *ptr, buffer[512];
1
0
0
0
Alexandre Julliard : user: Get rid of the WINPROC_MapMsg32WTo32A function.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: 7033649c4f4c148220c60999a15ee5aa1bf4ec7b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7033649c4f4c148220c6099…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 12:29:19 2006 +0200 user: Get rid of the WINPROC_MapMsg32WTo32A function. --- dlls/user/winproc.c | 32 ++++++-------------------------- 1 files changed, 6 insertions(+), 26 deletions(-) diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index 6197f0f..7c82591 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -982,26 +982,6 @@ LRESULT WINPROC_UnmapMsg32ATo32W( HWND h } -/********************************************************************** - * WINPROC_MapMsg32WTo32A - * - * Map a message from Unicode to Ansi. - * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. - */ -static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plparam ) -{ - switch(msg) - { - case WM_PAINTCLIPBOARD: - case WM_SIZECLIPBOARD: - FIXME_(msg)("message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg, hwnd),msg ); - return -1; - default: /* No translation needed */ - return 0; - } -} - - static UINT convert_handle_16_to_32(HANDLE16 src, unsigned int flags) { HANDLE dst; @@ -2756,7 +2736,6 @@ static LRESULT WINPROC_CallProc32WTo32A( LPARAM lParam, BOOL dialog ) { LRESULT ret = 0; - int unmap; TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n", func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam); @@ -3011,12 +2990,13 @@ static LRESULT WINPROC_CallProc32WTo32A( } break; + case WM_PAINTCLIPBOARD: + case WM_SIZECLIPBOARD: + FIXME_(msg)( "message %s (%04x) needs translation, please report\n", + SPY_GetMsgName(msg, hwnd), msg ); + break; + default: - if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) { - ERR_(msg)("Message translation failed. (msg=%s,wp=%08x,lp=%08lx)\n", - SPY_GetMsgName(msg, hwnd), wParam, lParam ); - return 0; - } ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); break; }
1
0
0
0
Alexandre Julliard : user: Added fast W->A mapping for WM_IME_CHAR.
by Alexandre Julliard
18 May '06
18 May '06
Module: wine Branch: refs/heads/master Commit: f6ba476d9103c93a944a404bfe82e663b7677c79 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f6ba476d9103c93a944a404…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 18 12:28:07 2006 +0200 user: Added fast W->A mapping for WM_IME_CHAR. --- dlls/user/winproc.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index b0bddaa..6197f0f 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -992,18 +992,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND { switch(msg) { - case WM_IME_CHAR: - { - WCHAR wch = LOWORD(*pwparam); - BYTE ch[2]; - - if (WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)ch, 2, NULL, NULL ) == 2) - *pwparam = MAKEWPARAM( (ch[0] << 8) | ch[1], HIWORD(*pwparam) ); - else - *pwparam = MAKEWPARAM( ch[0], HIWORD(*pwparam) ); - } - return 0; - case WM_PAINTCLIPBOARD: case WM_SIZECLIPBOARD: FIXME_(msg)("message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg, hwnd),msg ); @@ -3008,6 +2996,21 @@ static LRESULT WINPROC_CallProc32WTo32A( } break; + case WM_IME_CHAR: + { + WCHAR wch = LOWORD(wParam); + BYTE ch[2]; + DWORD len; + + RtlUnicodeToMultiByteN( (LPSTR)ch, 2, &len, &wch, sizeof(WCHAR) ); + if (len == 2) + wParam = MAKEWPARAM( (ch[0] << 8) | ch[1], HIWORD(wParam) ); + else + wParam = MAKEWPARAM( ch[0], HIWORD(wParam) ); + ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); + } + break; + default: if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) { ERR_(msg)("Message translation failed. (msg=%s,wp=%08x,lp=%08lx)\n",
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
87
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
Results per page:
10
25
50
100
200