ReactOS.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
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
List overview
Download
Ros-diffs
September 2009
----- 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
ros-diffs@reactos.org
16 participants
270 discussions
Start a n
N
ew thread
[dchapyshev] 42996: - Sync sti with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 5 17:04:13 2009 New Revision: 42996 URL:
http://svn.reactos.org/svn/reactos?rev=42996&view=rev
Log: - Sync sti with Wine 1.1.29 Added: trunk/reactos/dll/win32/sti/regsvr.c (with props) Modified: trunk/reactos/dll/win32/sti/sti.rbuild trunk/reactos/dll/win32/sti/sti.spec Added: trunk/reactos/dll/win32/sti/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/regsvr.c?rev…
============================================================================== --- trunk/reactos/dll/win32/sti/regsvr.c (added) +++ trunk/reactos/dll/win32/sti/regsvr.c [iso-8859-1] Sat Sep 5 17:04:13 2009 @@ -1,0 +1,426 @@ +/* + * self-registerable dll functions for sti.dll + * + * Copyright (C) 2003 John K. Hohm + * Copyright (C) 2009 Damjan Jovanovic + * + * 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 + */ + + +#include <stdarg.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" +#include "objbase.h" +#include "initguid.h" +#include "sti.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(sti); + +/* + * Near the bottom of this file are the exported DllRegisterServer and + * DllUnregisterServer, which make all this worthwhile. + */ + +/*********************************************************************** + * interface for self-registering + */ +struct regsvr_interface +{ + IID const *iid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + IID const *base_iid; /* can be NULL to omit */ + int num_methods; /* can be <0 to omit */ + CLSID const *ps_clsid; /* can be NULL to omit */ + CLSID const *ps_clsid32; /* can be NULL to omit */ +}; + +static HRESULT register_interfaces(struct regsvr_interface const *list); +static HRESULT unregister_interfaces(struct regsvr_interface const *list); + +struct regsvr_coclass +{ + CLSID const *clsid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + LPCSTR ips; /* can be NULL to omit */ + LPCSTR ips32; /* can be NULL to omit */ + LPCSTR ips32_tmodel; /* can be NULL to omit */ + LPCSTR clsid_str; /* can be NULL to omit */ + LPCSTR progid; /* can be NULL to omit */ +}; + +static HRESULT register_coclasses(struct regsvr_coclass const *list); +static HRESULT unregister_coclasses(struct regsvr_coclass const *list); + +/*********************************************************************** + * static string constants + */ +static WCHAR const interface_keyname[10] = { + 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; +static WCHAR const base_ifa_keyname[14] = { + 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', + 'e', 0 }; +static WCHAR const num_methods_keyname[11] = { + 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; +static WCHAR const ps_clsid_keyname[15] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', 0 }; +static WCHAR const ps_clsid32_keyname[17] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', '3', '2', 0 }; +static WCHAR const clsid_keyname[6] = { + 'C', 'L', 'S', 'I', 'D', 0 }; +static WCHAR const ips_keyname[13] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + 0 }; +static WCHAR const ips32_keyname[15] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + '3', '2', 0 }; +static WCHAR const progid_keyname[7] = { + 'P', 'r', 'o', 'g', 'I', 'D', 0 }; +static char const tmodel_valuename[] = "ThreadingModel"; + +/*********************************************************************** + * static helper functions + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); +static LONG register_key_defvalueW(HKEY base, WCHAR const *name, + WCHAR const *value); +static LONG register_key_defvalueA(HKEY base, WCHAR const *name, + char const *value); + +/*********************************************************************** + * register_interfaces + */ +static HRESULT register_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + HKEY iid_key; + + StringFromGUID2(list->iid, buf, 39); + res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_interface_key; + + if (list->name) { + res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->base_iid) { + res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (0 <= list->num_methods) { + static WCHAR const fmt[3] = { '%', 'd', 0 }; + HKEY key; + + res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + + sprintfW(buf, fmt, list->num_methods); + res = RegSetValueExW(key, NULL, 0, REG_SZ, + (CONST BYTE*)buf, + (lstrlenW(buf) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid) { + res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid32) { + res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + error_close_iid_key: + RegCloseKey(iid_key); + } + +error_close_interface_key: + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_interfaces + */ +static HRESULT unregister_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, + KEY_READ | KEY_WRITE, &interface_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->iid, buf, 39); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + } + + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * register_coclasses + */ +static HRESULT register_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + HKEY clsid_key; + + StringFromGUID2(list->clsid, buf, 39); + res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->name) { + res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips) { + res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips32) { + HKEY ips32_key; + + res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &ips32_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, + (CONST BYTE*)list->ips32, + lstrlenA(list->ips32) + 1); + if (res == ERROR_SUCCESS && list->ips32_tmodel) + res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, + (CONST BYTE*)list->ips32_tmodel, + strlen(list->ips32_tmodel) + 1); + RegCloseKey(ips32_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->clsid_str) { + res = register_key_defvalueA(clsid_key, clsid_keyname, + list->clsid_str); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->progid) { + HKEY progid_key; + + res = register_key_defvalueA(clsid_key, progid_keyname, + list->progid); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, + NULL, 0, KEY_READ | KEY_WRITE, NULL, + &progid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = register_key_defvalueW(progid_key, clsid_keyname, buf); + RegCloseKey(progid_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + error_close_clsid_key: + RegCloseKey(clsid_key); + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_coclasses + */ +static HRESULT unregister_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, + KEY_READ | KEY_WRITE, &coclass_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->clsid, buf, 39); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->progid) { + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + } + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * regsvr_key_guid + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) +{ + WCHAR buf[39]; + + StringFromGUID2(guid, buf, 39); + return register_key_defvalueW(base, name, buf); +} + +/*********************************************************************** + * regsvr_key_defvalueW + */ +static LONG register_key_defvalueW( + HKEY base, + WCHAR const *name, + WCHAR const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + (lstrlenW(value) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * regsvr_key_defvalueA + */ +static LONG register_key_defvalueA( + HKEY base, + WCHAR const *name, + char const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + lstrlenA(value) + 1); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * coclass list + */ +static struct regsvr_coclass const coclass_list[] = { + { &CLSID_Sti, + "StillImage", + NULL, + "sti.dll", + "Both" + }, + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * interface list + */ +static struct regsvr_interface const interface_list[] = { + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * DllRegisterServer (INETCOMM.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = register_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = register_interfaces(interface_list); + return hr; +} + +/*********************************************************************** + * DllUnregisterServer (INETCOMM.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = unregister_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = unregister_interfaces(interface_list); + return hr; +} Propchange: trunk/reactos/dll/win32/sti/regsvr.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/sti/sti.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti.rbuild?r…
============================================================================== --- trunk/reactos/dll/win32/sti/sti.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/sti/sti.rbuild [iso-8859-1] Sat Sep 5 17:04:13 2009 @@ -2,13 +2,17 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="sti" type="win32dll" baseaddress="${BASEADDRESS_STI}" installbase="system32" installname="sti.dll" allowwarnings="true" entrypoint="0"> - <!--autoregister infsection="OleControlDlls" type="DllRegisterServer" /--> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="sti.spec" /> <include base="sti">.</include> <include base="ReactOS">include/reactos/wine</include> + <redefine name="_WIN32_WINNT">0x600</redefine> <define name="__WINESRC__" /> + <file>regsvr.c</file> <file>sti_main.c</file> <library>wine</library> + <library>advapi32</library> + <library>ole32</library> <library>kernel32</library> <library>ntdll</library> </module> Modified: trunk/reactos/dll/win32/sti/sti.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti.spec?rev…
============================================================================== --- trunk/reactos/dll/win32/sti/sti.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/sti/sti.spec [iso-8859-1] Sat Sep 5 17:04:13 2009 @@ -1,7 +1,7 @@ @ stub DllCanUnloadNow @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stdcall StiCreateInstance(ptr long ptr ptr) @ stdcall StiCreateInstanceA(ptr long ptr ptr) @ stdcall StiCreateInstanceW(ptr long ptr ptr)
15 years, 3 months
1
0
0
0
[dchapyshev] 42995: - Sync ole32 and oleaut32 with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 5 17:03:37 2009 New Revision: 42995 URL:
http://svn.reactos.org/svn/reactos?rev=42995&view=rev
Log: - Sync ole32 and oleaut32 with Wine 1.1.29 Modified: trunk/reactos/dll/win32/ole32/compositemoniker.c trunk/reactos/dll/win32/ole32/hglobalstream.c trunk/reactos/dll/win32/ole32/ole2stubs.c trunk/reactos/dll/win32/ole32/ole32.spec trunk/reactos/dll/win32/ole32/stg_prop.c trunk/reactos/dll/win32/ole32/stg_stream.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/dll/win32/oleaut32/olepicture.c trunk/reactos/dll/win32/oleaut32/typelib.c Modified: trunk/reactos/dll/win32/ole32/compositemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compositem…
============================================================================== --- trunk/reactos/dll/win32/ole32/compositemoniker.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/compositemoniker.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -552,6 +552,7 @@ IEnumMoniker *enumMoniker1,*enumMoniker2; IMoniker *tempMk1,*tempMk2; HRESULT res1,res2,res; + BOOL done; TRACE("(%p,%p)\n",iface,pmkOtherMoniker); @@ -567,27 +568,18 @@ IMoniker_Enum(iface,TRUE,&enumMoniker2); - while(1){ + do { res1=IEnumMoniker_Next(enumMoniker1,1,&tempMk1,NULL); res2=IEnumMoniker_Next(enumMoniker2,1,&tempMk2,NULL); if((res1==S_OK)&&(res2==S_OK)){ - - if(IMoniker_IsEqual(tempMk1,tempMk2)==S_FALSE){ - res= S_FALSE; - break; - } - else - continue; - } - else if ( (res1==S_FALSE) && (res2==S_FALSE) ){ - res = S_OK; - break; - } - else{ - res = S_FALSE; - break; + done = (res = IMoniker_IsEqual(tempMk1,tempMk2)) == S_FALSE; + } + else + { + res = (res1==S_FALSE) && (res2==S_FALSE); + done = TRUE; } if (res1==S_OK) @@ -595,7 +587,7 @@ if (res2==S_OK) IMoniker_Release(tempMk2); - } + } while (!done); IEnumMoniker_Release(enumMoniker1); IEnumMoniker_Release(enumMoniker2); @@ -989,12 +981,12 @@ nbRestMk++; IMoniker_Release(tempMk1); - IMoniker_Release(tempMk1); + IMoniker_Release(tempMk2); break; } IMoniker_Release(tempMk1); - IMoniker_Release(tempMk1); + IMoniker_Release(tempMk2); } } else{ Modified: trunk/reactos/dll/win32/ole32/hglobalstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/hglobalstr…
============================================================================== --- trunk/reactos/dll/win32/ole32/hglobalstream.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/hglobalstream.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -397,7 +397,7 @@ */ if (dlibMove.QuadPart < 0 && newPosition.QuadPart < -dlibMove.QuadPart) return STG_E_INVALIDFUNCTION; - newPosition.QuadPart = RtlLargeIntegerAdd(newPosition.QuadPart, dlibMove.QuadPart); + newPosition.QuadPart += dlibMove.QuadPart; if (plibNewPosition) *plibNewPosition = newPosition; This->currentPosition = newPosition; Modified: trunk/reactos/dll/win32/ole32/ole2stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2stubs.…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole2stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole2stubs.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -128,3 +128,12 @@ FIXME("stub!\n"); return E_NOTIMPL; } + +/*********************************************************************** + * CoGetCurrentLogicalThreadId [OLE32.@] + */ +HRESULT WINAPI CoGetCurrentLogicalThreadId(GUID *pguid) +{ + FIXME(": stub\n"); + return E_NOTIMPL; +} Modified: trunk/reactos/dll/win32/ole32/ole32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.spec…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -25,7 +25,7 @@ @ stdcall CoGetCallerTID(ptr) @ stdcall CoGetClassObject(ptr long ptr ptr ptr) @ stdcall CoGetContextToken(ptr) -@ stub CoGetCurrentLogicalThreadId +@ stdcall CoGetCurrentLogicalThreadId(ptr) @ stdcall CoGetCurrentProcess() @ stub CoGetInstanceFromFile #@ stdcall (ptr ptr ptr long wstr long ptr) return 0,ERR_NOTIMPLEMENTED @ stub CoGetInstanceFromIStorage #@ stdcall (ptr ptr ptr long ptr long ptr) return 0,ERR_NOTIMPLEMENTED Modified: trunk/reactos/dll/win32/ole32/stg_prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_prop.c…
============================================================================== --- trunk/reactos/dll/win32/ole32/stg_prop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/stg_prop.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -977,7 +977,7 @@ * FIXME: alignment? */ for (i = 0; i < len; i++) - str[i] = le16toh(str[i]); + str[i] = lendian16toh(str[i]); } #else #define PropertyStorage_ByteSwapString(s, l) Modified: trunk/reactos/dll/win32/ole32/stg_stream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_stream…
============================================================================== --- trunk/reactos/dll/win32/ole32/stg_stream.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/stg_stream.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -522,7 +522,7 @@ return STG_E_INVALIDFUNCTION; } - plibNewPosition->QuadPart = RtlLargeIntegerAdd( plibNewPosition->QuadPart, dlibMove.QuadPart ); + plibNewPosition->QuadPart += dlibMove.QuadPart; /* * tell the caller what we calculated Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -3563,7 +3563,7 @@ { resRead = SmallBlockChainStream_ReadAt(*ppsbChain, offset, - This->smallBlockSize, + min(This->smallBlockSize, size.u.LowPart - offset.u.LowPart), buffer, &cbRead); if (FAILED(resRead)) @@ -3582,7 +3582,7 @@ if (FAILED(resWrite)) break; - offset.u.LowPart += This->smallBlockSize; + offset.u.LowPart += cbRead; } } while (cbTotalRead.QuadPart < size.QuadPart); HeapFree(GetProcessHeap(),0,buffer); @@ -3663,7 +3663,8 @@ do { resRead = BlockChainStream_ReadAt(*ppbbChain, offset, - This->bigBlockSize, buffer, &cbRead); + min(This->bigBlockSize, size.u.LowPart - offset.u.LowPart), + buffer, &cbRead); if(FAILED(resRead)) break; @@ -3678,7 +3679,7 @@ if(FAILED(resWrite)) break; - offset.u.LowPart += This->bigBlockSize; + offset.u.LowPart += cbRead; } }while(cbTotalRead.QuadPart < size.QuadPart); HeapFree(GetProcessHeap(), 0, buffer); @@ -5917,7 +5918,7 @@ */ hr = StorageBaseImpl_QueryInterface( (IStorage*)newStorage, - (REFIID)&IID_IStorage, + &IID_IStorage, (void**)ppstgOpen); end: TRACE("<-- %p r = %08x\n", *ppstgOpen, hr); @@ -6221,7 +6222,7 @@ */ hr = StorageBaseImpl_QueryInterface( (IStorage*)newStorage, - (REFIID)&IID_IStorage, + &IID_IStorage, (void**)ppstgOpen); end: @@ -6275,7 +6276,7 @@ */ hr = StorageBaseImpl_QueryInterface( (IStorage*)newStorage, - (REFIID)&IID_IStorage, + &IID_IStorage, (void**)ppstgOpen); return hr; @@ -6340,7 +6341,7 @@ */ hr = StorageBaseImpl_QueryInterface( (IStorage*)newStorage, - (REFIID)&IID_IStorage, + &IID_IStorage, (void**)ppstgOpen); return hr; @@ -7192,9 +7193,9 @@ debugstr_w(lpszUserType), debugstr_w(szClipName), debugstr_w(szProgIDName)); - /* Create a CompObj stream if it doesn't exist */ + /* Create a CompObj stream */ r = IStorage_CreateStream(pstg, szwStreamName, - STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &pstm ); + STGM_CREATE | STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &pstm ); if( FAILED (r) ) return r; Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -46,28 +46,6 @@ #include <stdio.h> #include <string.h> -#ifdef SONAME_LIBJPEG -/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/ -#define XMD_H -#define UINT8 JPEG_UINT8 -#define UINT16 JPEG_UINT16 -#define boolean jpeg_boolean -#undef HAVE_STDLIB_H -# include <jpeglib.h> -#undef HAVE_STDLIB_H -#define HAVE_STDLIB_H 1 -#undef UINT8 -#undef UINT16 -#undef boolean -#endif - -#ifdef HAVE_PNG_H -#include <png.h> -#endif - -/* Must be before wine includes, the header has things conflicting with - * WINE headers. - */ #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT @@ -1002,167 +980,6 @@ return E_NOTIMPL; } -#ifdef SONAME_LIBJPEG - -static void *libjpeg_handle; -#define MAKE_FUNCPTR(f) static typeof(f) * p##f -MAKE_FUNCPTR(jpeg_std_error); -MAKE_FUNCPTR(jpeg_CreateDecompress); -MAKE_FUNCPTR(jpeg_read_header); -MAKE_FUNCPTR(jpeg_start_decompress); -MAKE_FUNCPTR(jpeg_read_scanlines); -MAKE_FUNCPTR(jpeg_finish_decompress); -MAKE_FUNCPTR(jpeg_destroy_decompress); -#undef MAKE_FUNCPTR - -static void *load_libjpeg(void) -{ - if((libjpeg_handle = wine_dlopen(SONAME_LIBJPEG, RTLD_NOW, NULL, 0)) != NULL) { - -#define LOAD_FUNCPTR(f) \ - if((p##f = wine_dlsym(libjpeg_handle, #f, NULL, 0)) == NULL) { \ - libjpeg_handle = NULL; \ - return NULL; \ - } - - LOAD_FUNCPTR(jpeg_std_error); - LOAD_FUNCPTR(jpeg_CreateDecompress); - LOAD_FUNCPTR(jpeg_read_header); - LOAD_FUNCPTR(jpeg_start_decompress); - LOAD_FUNCPTR(jpeg_read_scanlines); - LOAD_FUNCPTR(jpeg_finish_decompress); - LOAD_FUNCPTR(jpeg_destroy_decompress); -#undef LOAD_FUNCPTR - } - return libjpeg_handle; -} - -/* for the jpeg decompressor source manager. */ -static void _jpeg_init_source(j_decompress_ptr cinfo) { } - -static jpeg_boolean _jpeg_fill_input_buffer(j_decompress_ptr cinfo) { - ERR("(), should not get here.\n"); - return FALSE; -} - -static void _jpeg_skip_input_data(j_decompress_ptr cinfo,long num_bytes) { - TRACE("Skipping %ld bytes...\n", num_bytes); - cinfo->src->next_input_byte += num_bytes; - cinfo->src->bytes_in_buffer -= num_bytes; -} - -static jpeg_boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) { - ERR("(desired=%d), should not get here.\n",desired); - return FALSE; -} -static void _jpeg_term_source(j_decompress_ptr cinfo) { } -#endif /* SONAME_LIBJPEG */ - -static HRESULT OLEPictureImpl_LoadJpeg(OLEPictureImpl *This, BYTE *xbuf, ULONG xread) -{ -#ifdef SONAME_LIBJPEG - struct jpeg_decompress_struct jd; - struct jpeg_error_mgr jerr; - int ret; - JDIMENSION x; - JSAMPROW samprow,oldsamprow; - BITMAPINFOHEADER bmi; - LPBYTE bits; - HDC hdcref; - struct jpeg_source_mgr xjsm; - LPBYTE oldbits; - unsigned int i; - - if(!libjpeg_handle) { - if(!load_libjpeg()) { - ERR("Failed reading JPEG because unable to find %s\n", SONAME_LIBJPEG); - return E_FAIL; - } - } - - /* This is basically so we can use in-memory data for jpeg decompression. - * We need to have all the functions. - */ - xjsm.next_input_byte = xbuf; - xjsm.bytes_in_buffer = xread; - xjsm.init_source = _jpeg_init_source; - xjsm.fill_input_buffer = _jpeg_fill_input_buffer; - xjsm.skip_input_data = _jpeg_skip_input_data; - xjsm.resync_to_restart = _jpeg_resync_to_restart; - xjsm.term_source = _jpeg_term_source; - - jd.err = pjpeg_std_error(&jerr); - /* jpeg_create_decompress is a macro that expands to jpeg_CreateDecompress - see jpeglib.h - * jpeg_create_decompress(&jd); */ - pjpeg_CreateDecompress(&jd, JPEG_LIB_VERSION, sizeof(struct jpeg_decompress_struct)); - jd.src = &xjsm; - ret=pjpeg_read_header(&jd,TRUE); - jd.out_color_space = JCS_RGB; - pjpeg_start_decompress(&jd); - if (ret != JPEG_HEADER_OK) { - ERR("Jpeg image in stream has bad format, read header returned %d.\n",ret); - HeapFree(GetProcessHeap(),0,xbuf); - return E_FAIL; - } - - bits = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, - (jd.output_height+1) * ((jd.output_width*jd.output_components + 3) & ~3) ); - samprow=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,jd.output_width*jd.output_components); - - oldbits = bits; - oldsamprow = samprow; - while ( jd.output_scanline<jd.output_height ) { - x = pjpeg_read_scanlines(&jd,&samprow,1); - if (x != 1) { - ERR("failed to read current scanline?\n"); - break; - } - /* We have to convert from RGB to BGR, see MSDN/ BITMAPINFOHEADER */ - for(i=0;i<jd.output_width;i++,samprow+=jd.output_components) { - *(bits++) = *(samprow+2); - *(bits++) = *(samprow+1); - *(bits++) = *(samprow); - } - bits = (LPBYTE)(((UINT_PTR)bits + 3) & ~3); - samprow = oldsamprow; - } - bits = oldbits; - - bmi.biSize = sizeof(bmi); - bmi.biWidth = jd.output_width; - bmi.biHeight = -jd.output_height; - bmi.biPlanes = 1; - bmi.biBitCount = jd.output_components<<3; - bmi.biCompression = BI_RGB; - bmi.biSizeImage = jd.output_height*jd.output_width*jd.output_components; - bmi.biXPelsPerMeter = 0; - bmi.biYPelsPerMeter = 0; - bmi.biClrUsed = 0; - bmi.biClrImportant = 0; - - HeapFree(GetProcessHeap(),0,samprow); - pjpeg_finish_decompress(&jd); - pjpeg_destroy_decompress(&jd); - hdcref = GetDC(0); - This->desc.u.bmp.hbitmap=CreateDIBitmap( - hdcref, - &bmi, - CBM_INIT, - bits, - (BITMAPINFO*)&bmi, - DIB_RGB_COLORS - ); - ReleaseDC(0, hdcref); - This->desc.picType = PICTYPE_BITMAP; - OLEPictureImpl_SetBitmap(This); - HeapFree(GetProcessHeap(),0,bits); - return S_OK; -#else - ERR("Trying to load JPEG picture, but JPEG supported not compiled in.\n"); - return E_FAIL; -#endif -} - static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xread) { BITMAPFILEHEADER *bfh = (BITMAPFILEHEADER*)xbuf; @@ -1319,298 +1136,52 @@ static HRESULT OLEPictureImpl_LoadWICDecoder(OLEPictureImpl *This, REFCLSID decoder_clsid, BYTE *xbuf, ULONG xread) { HRESULT hr; + IWICImagingFactory *factory; IWICBitmapDecoder *decoder; IWICBitmapFrameDecode *framedecode; HRESULT initresult; - HGLOBAL hdata; - BYTE *data; - IStream *stream; - - hdata = GlobalAlloc(GMEM_MOVEABLE, xread); - if (!hdata) return E_OUTOFMEMORY; - - data = GlobalLock(hdata); - memcpy(data, xbuf, xread); - GlobalUnlock(hdata); - - hr = CreateStreamOnHGlobal(hdata, TRUE, &stream); - if (FAILED(hr)) + IWICStream *stream; + + initresult = CoInitialize(NULL); + + hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICImagingFactory, (void**)&factory); + if (SUCCEEDED(hr)) /* created factory */ { - GlobalFree(hdata); - return hr; - } - - initresult = CoInitialize(NULL); - - hr = CoCreateInstance(decoder_clsid, NULL, CLSCTX_INPROC_SERVER, - &IID_IWICBitmapDecoder, (void**)&decoder); - if (FAILED(hr)) goto end; - - hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad); - if (SUCCEEDED(hr)) + hr = IWICImagingFactory_CreateStream(factory, &stream); + IWICImagingFactory_Release(factory); + } + + if (SUCCEEDED(hr)) /* created stream */ { - hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode); - if (SUCCEEDED(hr)) + hr = IWICStream_InitializeFromMemory(stream, xbuf, xread); + + if (SUCCEEDED(hr)) /* initialized stream */ { - hr = OLEPictureImpl_LoadWICSource(This, (IWICBitmapSource*)framedecode); - IWICBitmapFrameDecode_Release(framedecode); + hr = CoCreateInstance(decoder_clsid, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICBitmapDecoder, (void**)&decoder); + if (SUCCEEDED(hr)) /* created decoder */ + { + hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnLoad); + + if (SUCCEEDED(hr)) /* initialized decoder */ + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode); + + IWICBitmapDecoder_Release(decoder); + } } - } - - IWICBitmapDecoder_Release(decoder); - -end: - IStream_Release(stream); + + IWICStream_Release(stream); + } + + if (SUCCEEDED(hr)) /* got framedecode */ + { + hr = OLEPictureImpl_LoadWICSource(This, (IWICBitmapSource*)framedecode); + IWICBitmapFrameDecode_Release(framedecode); + } + if (SUCCEEDED(initresult)) CoUninitialize(); return hr; -} - -/***************************************************** -* start of PNG-specific code -* currently only supports colortype PNG_COLOR_TYPE_RGB -*/ -#ifdef SONAME_LIBPNG -typedef struct{ - ULONG position; - ULONG size; - BYTE * buff; -} png_io; - -static void png_stream_read_data(png_structp png_ptr, png_bytep data, - png_size_t length) -{ - png_io * io_ptr = png_ptr->io_ptr; - - if(length + io_ptr->position > io_ptr->size){ - length = io_ptr->size - io_ptr->position; - } - - memcpy(data, io_ptr->buff + io_ptr->position, length); - - io_ptr->position += length; -} - -static void *libpng_handle; -#define MAKE_FUNCPTR(f) static typeof(f) * p##f -MAKE_FUNCPTR(png_create_read_struct); -MAKE_FUNCPTR(png_create_info_struct); -MAKE_FUNCPTR(png_set_read_fn); -MAKE_FUNCPTR(png_read_info); -MAKE_FUNCPTR(png_read_image); -MAKE_FUNCPTR(png_get_rowbytes); -MAKE_FUNCPTR(png_set_bgr); -MAKE_FUNCPTR(png_destroy_read_struct); -MAKE_FUNCPTR(png_set_palette_to_rgb); -MAKE_FUNCPTR(png_read_update_info); -MAKE_FUNCPTR(png_get_tRNS); -MAKE_FUNCPTR(png_get_PLTE); -MAKE_FUNCPTR(png_set_expand); -#undef MAKE_FUNCPTR - -static void *load_libpng(void) -{ - if((libpng_handle = wine_dlopen(SONAME_LIBPNG, RTLD_NOW, NULL, 0)) != NULL) { - -#define LOAD_FUNCPTR(f) \ - if((p##f = wine_dlsym(libpng_handle, #f, NULL, 0)) == NULL) { \ - libpng_handle = NULL; \ - return NULL; \ - } - LOAD_FUNCPTR(png_create_read_struct); - LOAD_FUNCPTR(png_create_info_struct); - LOAD_FUNCPTR(png_set_read_fn); - LOAD_FUNCPTR(png_read_info); - LOAD_FUNCPTR(png_read_image); - LOAD_FUNCPTR(png_get_rowbytes); - LOAD_FUNCPTR(png_set_bgr); - LOAD_FUNCPTR(png_destroy_read_struct); - LOAD_FUNCPTR(png_set_palette_to_rgb); - LOAD_FUNCPTR(png_read_update_info); - LOAD_FUNCPTR(png_get_tRNS); - LOAD_FUNCPTR(png_get_PLTE); - LOAD_FUNCPTR(png_set_expand); - -#undef LOAD_FUNCPTR - } - return libpng_handle; -} -#endif /* SONAME_LIBPNG */ - -static HRESULT OLEPictureImpl_LoadPNG(OLEPictureImpl *This, BYTE *xbuf, ULONG xread) -{ -#ifdef SONAME_LIBPNG - png_io io; - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; - INT row, rowsize, height, width, num_trans, i, j; - png_bytep* row_pointers = NULL; - png_bytep pngdata = NULL; - BITMAPINFOHEADER bmi; - HDC hdcref = NULL, hdcXor, hdcMask; - HRESULT ret; - BOOL transparency; - png_bytep trans; - png_color_16p trans_values; - COLORREF white = RGB(255, 255, 255), black = RGB(0, 0, 0); - HBITMAP hbmoldXor, hbmoldMask, temp; - - if(!libpng_handle) { - if(!load_libpng()) { - ERR("Failed reading PNG because unable to find %s\n",SONAME_LIBPNG); - return E_FAIL; - } - } - - io.size = xread; - io.position = 0; - io.buff = xbuf; - - png_ptr = ppng_create_read_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); - - if(setjmp(png_jmpbuf(png_ptr))){ - TRACE("Error in libpng\n"); - ret = E_FAIL; - goto end; - } - - info_ptr = ppng_create_info_struct(png_ptr); - ppng_set_read_fn(png_ptr, &io, png_stream_read_data); - ppng_read_info(png_ptr, info_ptr); - - if(!(png_ptr->color_type == PNG_COLOR_TYPE_RGB || - png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || - png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)){ - FIXME("Unsupported .PNG type: %d\n", png_ptr->color_type); - ret = E_FAIL; - goto end; - } - - transparency = (ppng_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &trans_values) - == PNG_INFO_tRNS); - - /* sets format from anything to RGBA */ - ppng_set_expand(png_ptr); - /* sets format to BGRA */ - ppng_set_bgr(png_ptr); - - ppng_read_update_info(png_ptr, info_ptr); - - rowsize = ppng_get_rowbytes(png_ptr, info_ptr); - /* align rowsize to 4-byte boundary */ - rowsize = (rowsize + 3) & ~3; - height = info_ptr->height; - width = info_ptr->width; - - pngdata = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, height * rowsize); - row_pointers = HeapAlloc(GetProcessHeap(), 0, height * (sizeof(VOID *))); - - if(!pngdata || !row_pointers){ - ret = E_FAIL; - goto end; - } - - for (row = 0; row < height; row++){ - row_pointers[row] = pngdata + row * rowsize; - } - - ppng_read_image(png_ptr, row_pointers); - - bmi.biSize = sizeof(bmi); - bmi.biWidth = width; - bmi.biHeight = -height; - bmi.biPlanes = 1; - bmi.biBitCount = info_ptr->channels * 8; - bmi.biCompression = BI_RGB; - bmi.biSizeImage = height * rowsize; - bmi.biXPelsPerMeter = 0; - bmi.biYPelsPerMeter = 0; - bmi.biClrUsed = 0; - bmi.biClrImportant = 0; - - hdcref = GetDC(0); - This->desc.u.bmp.hbitmap = CreateDIBitmap( - hdcref, - &bmi, - CBM_INIT, - pngdata, - (BITMAPINFO*)&bmi, - DIB_RGB_COLORS - ); - - /* only fully-transparent alpha is handled */ - if((info_ptr->channels != 4) || !transparency){ - ReleaseDC(0, hdcref); - goto succ; - } - - This->hbmXor = CreateDIBitmap( - hdcref, - &bmi, - CBM_INIT, - pngdata, - (BITMAPINFO*)&bmi, - DIB_RGB_COLORS - ); - - /* set transparent pixels to black, all others to white */ - for(i = 0; i < height; i++){ - for(j = 3; j < rowsize; j += 4){ - if(row_pointers[i][j] == 0) - *((DWORD*)(&row_pointers[i][j - 3])) = black; - else - *((DWORD*)(&row_pointers[i][j - 3])) = white; - } - } - - temp = CreateDIBitmap( - hdcref, - &bmi, - CBM_INIT, - pngdata, - (BITMAPINFO*)&bmi, - DIB_RGB_COLORS - ); - - ReleaseDC(0, hdcref); - - This->hbmMask = CreateBitmap(width,-height,1,1,NULL); - hdcXor = CreateCompatibleDC(NULL); - hdcMask = CreateCompatibleDC(NULL); - - hbmoldXor = SelectObject(hdcXor,temp); - hbmoldMask = SelectObject(hdcMask,This->hbmMask); - SetBkColor(hdcXor,black); - BitBlt(hdcMask,0,0,width,height,hdcXor,0,0,SRCCOPY); - - SelectObject(hdcXor,This->hbmXor); - DeleteObject(temp); - - SetTextColor(hdcXor,white); - SetBkColor(hdcXor,black); - BitBlt(hdcXor,0,0,width,height,hdcMask,0,0,SRCAND); - - SelectObject(hdcXor,hbmoldXor); - SelectObject(hdcMask,hbmoldMask); - - DeleteDC(hdcXor); - DeleteDC(hdcMask); - -succ: - This->desc.picType = PICTYPE_BITMAP; - OLEPictureImpl_SetBitmap(This); - ret = S_OK; - -end: - if(png_ptr) - ppng_destroy_read_struct(&png_ptr, info_ptr ? &info_ptr : NULL, NULL); - HeapFree(GetProcessHeap(), 0, row_pointers); - HeapFree(GetProcessHeap(), 0, pngdata); - return ret; -#else /* SONAME_LIBPNG */ - ERR("Trying to load PNG picture, but PNG supported not compiled in.\n"); - return E_FAIL; -#endif } /***************************************************** @@ -1889,13 +1460,13 @@ hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICGifDecoder, xbuf, xread); break; case BITMAP_FORMAT_JPEG: /* JPEG */ - hr = OLEPictureImpl_LoadJpeg(This, xbuf, xread); + hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICJpegDecoder, xbuf, xread); break; case BITMAP_FORMAT_BMP: /* Bitmap */ hr = OLEPictureImpl_LoadDIB(This, xbuf, xread); break; case BITMAP_FORMAT_PNG: /* PNG */ - hr = OLEPictureImpl_LoadPNG(This, xbuf, xread); + hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICPngDecoder, xbuf, xread); break; case BITMAP_FORMAT_APM: /* APM */ hr = OLEPictureImpl_LoadAPM(This, xbuf, xread); Modified: trunk/reactos/dll/win32/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Sat Sep 5 17:03:37 2009 @@ -930,6 +930,7 @@ const ITypeCompVtbl *lpVtblTypeComp; LONG ref; TLIBATTR LibAttr; /* guid,lcid,syskind,version,flags */ + LCID lcid; /* strings can be stored in tlb as multibyte strings BUT they are *always* * exported to the application as a UNICODE string. @@ -2878,6 +2879,8 @@ pTypeLibImpl->LibAttr.wMinorVerNum = HIWORD(tlbHeader.version); pTypeLibImpl->LibAttr.wLibFlags = (WORD) tlbHeader.flags & 0xffff;/* check mask */ + pTypeLibImpl->lcid = tlbHeader.lcid; + /* name, eventually add to a hash table */ pTypeLibImpl->Name = MSFT_ReadName(&cx, tlbHeader.NameOffset); @@ -3099,9 +3102,9 @@ ptr += 2; if(SUBLANGID(*(WORD*)ptr) == SUBLANG_NEUTRAL) - pTypeLibImpl->LibAttr.lcid = MAKELCID(MAKELANGID(PRIMARYLANGID(*(WORD*)ptr),0),0); + pTypeLibImpl->lcid = pTypeLibImpl->LibAttr.lcid = MAKELCID(MAKELANGID(PRIMARYLANGID(*(WORD*)ptr),0),0); else - pTypeLibImpl->LibAttr.lcid = 0; + pTypeLibImpl->lcid = pTypeLibImpl->LibAttr.lcid = 0; ptr += 2; ptr += 4; /* skip res12 */ @@ -3131,7 +3134,7 @@ static HRESULT sltg_get_typelib_ref(const sltg_ref_lookup_t *table, DWORD typeinfo_ref, HREFTYPE *typelib_ref) { - if(typeinfo_ref < table->num) + if(table && typeinfo_ref < table->num) { *typelib_ref = table->refs[typeinfo_ref]; return S_OK; @@ -6063,6 +6066,7 @@ VARTYPE *rgvt = INVBUF_GET_ARG_TYPE_ARRAY(buffer, func_desc->cParams); UINT cNamedArgs = pDispParams->cNamedArgs; DISPID *rgdispidNamedArgs = pDispParams->rgdispidNamedArgs; + UINT vargs_converted=0; hres = S_OK; @@ -6100,6 +6104,15 @@ USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; VARIANTARG *src_arg; + if (wParamFlags & PARAMFLAG_FLCID) + { + VARIANTARG *arg; + arg = prgpvarg[i] = &rgvarg[i]; + V_VT(arg) = VT_I4; + V_I4(arg) = This->pTypeLib->lcid; + continue; + } + if (cNamedArgs) { USHORT j; @@ -6112,7 +6125,10 @@ } } else - src_arg = i < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - i] : NULL; + { + src_arg = vargs_converted < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - vargs_converted] : NULL; + vargs_converted++; + } if (wParamFlags & PARAMFLAG_FRETVAL) { @@ -6278,10 +6294,15 @@ V_VT(&varresult), func_desc->cParams, rgvt, prgpvarg, &varresult); + vargs_converted = 0; + for (i = 0; i < func_desc->cParams; i++) { USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; - if (wParamFlags & PARAMFLAG_FRETVAL) + + if (wParamFlags & PARAMFLAG_FLCID) + continue; + else if (wParamFlags & PARAMFLAG_FRETVAL) { if (TRACE_ON(ole)) { @@ -6309,11 +6330,11 @@ } break; } - else if (i < pDispParams->cArgs) + else if (vargs_converted < pDispParams->cArgs) { if (wParamFlags & PARAMFLAG_FOUT) { - VARIANTARG *arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - i]; + VARIANTARG *arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - vargs_converted]; if ((rgvt[i] == VT_BYREF) && (V_VT(arg) != VT_BYREF)) hres = VariantChangeType(arg, &rgvarg[i], 0, V_VT(arg)); @@ -6321,7 +6342,7 @@ if (FAILED(hres)) { ERR("failed to convert param %d to vt %d\n", i, - V_VT(&pDispParams->rgvarg[pDispParams->cArgs - 1 - i])); + V_VT(&pDispParams->rgvarg[pDispParams->cArgs - 1 - vargs_converted])); break; } } @@ -6354,6 +6375,7 @@ } } VariantClear(&rgvarg[i]); + vargs_converted++; } else if (wParamFlags & PARAMFLAG_FOPT) { @@ -7047,13 +7069,12 @@ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); - if(pCData) - { - VariantInit( pVarVal); + VariantInit( pVarVal); + if (pCData) VariantCopy( pVarVal, &pCData->data); - return S_OK; - } - return E_INVALIDARG; /* FIXME: correct? */ + else + VariantClear( pVarVal ); + return S_OK; } /* ITypeInfo2::GetFuncCustData
15 years, 3 months
1
0
0
0
[dchapyshev] 42994: - Sync msctf, mshtml and msxml3 with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 5 17:02:49 2009 New Revision: 42994 URL:
http://svn.reactos.org/svn/reactos?rev=42994&view=rev
Log: - Sync msctf, mshtml and msxml3 with Wine 1.1.29 Added: trunk/reactos/dll/win32/msctf/compartmentmgr.c (with props) trunk/reactos/dll/win32/msctf/textstor_local.idl (with props) Modified: trunk/reactos/dll/win32/msctf/context.c trunk/reactos/dll/win32/msctf/documentmgr.c trunk/reactos/dll/win32/msctf/inputprocessor.c trunk/reactos/dll/win32/msctf/msctf.c trunk/reactos/dll/win32/msctf/msctf.rbuild trunk/reactos/dll/win32/msctf/msctf.spec trunk/reactos/dll/win32/msctf/msctf_internal.h trunk/reactos/dll/win32/msctf/range.c trunk/reactos/dll/win32/msctf/threadmgr.c trunk/reactos/dll/win32/mshtml/dispex.c trunk/reactos/dll/win32/mshtml/htmlcurstyle.c trunk/reactos/dll/win32/mshtml/htmldoc.c trunk/reactos/dll/win32/mshtml/htmlelem.c trunk/reactos/dll/win32/mshtml/htmlelemcol.c trunk/reactos/dll/win32/mshtml/htmlevent.c trunk/reactos/dll/win32/mshtml/htmlinput.c trunk/reactos/dll/win32/mshtml/htmllocation.c trunk/reactos/dll/win32/mshtml/htmlnode.c trunk/reactos/dll/win32/mshtml/htmlstyle.c trunk/reactos/dll/win32/mshtml/htmlstyle.h trunk/reactos/dll/win32/mshtml/htmlwindow.c trunk/reactos/dll/win32/mshtml/mshtml.rbuild trunk/reactos/dll/win32/mshtml/mshtml_private.h trunk/reactos/dll/win32/mshtml/mutation.c trunk/reactos/dll/win32/mshtml/navigate.c trunk/reactos/dll/win32/mshtml/nsembed.c trunk/reactos/dll/win32/mshtml/nsevents.c trunk/reactos/dll/win32/mshtml/nsiface.idl trunk/reactos/dll/win32/mshtml/nsio.c trunk/reactos/dll/win32/mshtml/omnavigator.c trunk/reactos/dll/win32/mshtml/persist.c trunk/reactos/dll/win32/mshtml/script.c trunk/reactos/dll/win32/msxml3/attribute.c trunk/reactos/dll/win32/msxml3/cdata.c trunk/reactos/dll/win32/msxml3/comment.c trunk/reactos/dll/win32/msxml3/dispex.c trunk/reactos/dll/win32/msxml3/docfrag.c trunk/reactos/dll/win32/msxml3/domdoc.c trunk/reactos/dll/win32/msxml3/element.c trunk/reactos/dll/win32/msxml3/entityref.c trunk/reactos/dll/win32/msxml3/msxml_private.h trunk/reactos/dll/win32/msxml3/node.c trunk/reactos/dll/win32/msxml3/pi.c trunk/reactos/dll/win32/msxml3/queryresult.c trunk/reactos/dll/win32/msxml3/text.c [This mail would be too long, it was shortened to contain the URLs only.] Added: trunk/reactos/dll/win32/msctf/compartmentmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/compartmen…
Modified: trunk/reactos/dll/win32/msctf/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/context.c?…
Modified: trunk/reactos/dll/win32/msctf/documentmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/documentmg…
Modified: trunk/reactos/dll/win32/msctf/inputprocessor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/inputproce…
Modified: trunk/reactos/dll/win32/msctf/msctf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.c?re…
Modified: trunk/reactos/dll/win32/msctf/msctf.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.rbui…
Modified: trunk/reactos/dll/win32/msctf/msctf.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.spec…
Modified: trunk/reactos/dll/win32/msctf/msctf_internal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf_inte…
Modified: trunk/reactos/dll/win32/msctf/range.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/range.c?re…
Added: trunk/reactos/dll/win32/msctf/textstor_local.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/textstor_l…
Modified: trunk/reactos/dll/win32/msctf/threadmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/threadmgr.…
Modified: trunk/reactos/dll/win32/mshtml/dispex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/dispex.c?…
Modified: trunk/reactos/dll/win32/mshtml/htmlcurstyle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlcurst…
Modified: trunk/reactos/dll/win32/mshtml/htmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmldoc.c…
Modified: trunk/reactos/dll/win32/mshtml/htmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelem.…
Modified: trunk/reactos/dll/win32/mshtml/htmlelemcol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelemc…
Modified: trunk/reactos/dll/win32/mshtml/htmlevent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlevent…
Modified: trunk/reactos/dll/win32/mshtml/htmlinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlinput…
Modified: trunk/reactos/dll/win32/mshtml/htmllocation.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmllocat…
Modified: trunk/reactos/dll/win32/mshtml/htmlnode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlnode.…
Modified: trunk/reactos/dll/win32/mshtml/htmlstyle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlstyle…
Modified: trunk/reactos/dll/win32/mshtml/htmlstyle.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlstyle…
Modified: trunk/reactos/dll/win32/mshtml/htmlwindow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlwindo…
Modified: trunk/reactos/dll/win32/mshtml/mshtml.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml.rb…
Modified: trunk/reactos/dll/win32/mshtml/mshtml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml_pr…
Modified: trunk/reactos/dll/win32/mshtml/mutation.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mutation.…
Modified: trunk/reactos/dll/win32/mshtml/navigate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/navigate.…
Modified: trunk/reactos/dll/win32/mshtml/nsembed.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsembed.c…
Modified: trunk/reactos/dll/win32/mshtml/nsevents.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsevents.…
Modified: trunk/reactos/dll/win32/mshtml/nsiface.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsiface.i…
Modified: trunk/reactos/dll/win32/mshtml/nsio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsio.c?re…
Modified: trunk/reactos/dll/win32/mshtml/omnavigator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/omnavigat…
Modified: trunk/reactos/dll/win32/mshtml/persist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/persist.c…
Modified: trunk/reactos/dll/win32/mshtml/script.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/script.c?…
Modified: trunk/reactos/dll/win32/msxml3/attribute.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/attribute…
Modified: trunk/reactos/dll/win32/msxml3/cdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/cdata.c?r…
Modified: trunk/reactos/dll/win32/msxml3/comment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/comment.c…
Modified: trunk/reactos/dll/win32/msxml3/dispex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/dispex.c?…
Modified: trunk/reactos/dll/win32/msxml3/docfrag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/docfrag.c…
Modified: trunk/reactos/dll/win32/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
Modified: trunk/reactos/dll/win32/msxml3/element.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
Modified: trunk/reactos/dll/win32/msxml3/entityref.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/entityref…
Modified: trunk/reactos/dll/win32/msxml3/msxml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml_pri…
Modified: trunk/reactos/dll/win32/msxml3/node.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
Modified: trunk/reactos/dll/win32/msxml3/pi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/pi.c?rev=…
Modified: trunk/reactos/dll/win32/msxml3/queryresult.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/queryresu…
Modified: trunk/reactos/dll/win32/msxml3/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/text.c?re…
15 years, 3 months
1
0
0
0
[dchapyshev] 42993: - Sync comctl32 and comdlg32 with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 5 17:01:30 2009 New Revision: 42993 URL:
http://svn.reactos.org/svn/reactos?rev=42993&view=rev
Log: - Sync comctl32 and comdlg32 with Wine 1.1.29 Modified: trunk/reactos/dll/win32/comctl32/comctl32.spec trunk/reactos/dll/win32/comctl32/imagelist.c trunk/reactos/dll/win32/comctl32/listview.c trunk/reactos/dll/win32/comctl32/propsheet.c trunk/reactos/dll/win32/comctl32/status.c trunk/reactos/dll/win32/comctl32/tab.c trunk/reactos/dll/win32/comctl32/trackbar.c trunk/reactos/dll/win32/comdlg32/filedlg.c Modified: trunk/reactos/dll/win32/comctl32/comctl32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32.spec [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -139,10 +139,12 @@ @ stdcall FlatSB_SetScrollRange (long long long long long) @ stdcall FlatSB_ShowScrollBar (long long long) @ stdcall GetMUILanguage() +@ stdcall HIMAGELIST_QueryInterface(ptr ptr ptr) @ stdcall ImageList_Add(ptr long long) @ stdcall ImageList_AddIcon(ptr long) @ stdcall ImageList_AddMasked(ptr long long) @ stdcall ImageList_BeginDrag(ptr long long long) +@ stdcall ImageList_CoCreateInstance(ptr ptr ptr ptr) @ stdcall ImageList_Copy(ptr long ptr long long) @ stdcall ImageList_Create(long long long long long) @ stdcall ImageList_Destroy(ptr) Modified: trunk/reactos/dll/win32/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imageli…
============================================================================== --- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -6,6 +6,7 @@ * Copyright 2001, 2004 Michael Stefaniuc * Copyright 2001 Charles Loep for CodeWeavers * Copyright 2002 Dimitrie O. Paun + * Copyright 2009 Owen Rudge for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -155,7 +156,7 @@ * This function CANNOT be used to reduce the number of images. */ static void -IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cy) +IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cx, INT cy) { HDC hdcBitmap; HBITMAP hbmNewBitmap, hbmNull; @@ -166,14 +167,15 @@ && (himl->cy >= cy)) return; + if (cx == 0) cx = himl->cx; nNewCount = himl->cCurImage + nImageCount + himl->cGrow; - imagelist_get_bitmap_size(himl, nNewCount, himl->cx, &sz); + imagelist_get_bitmap_size(himl, nNewCount, cx, &sz); TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, sz.cx, cy, nNewCount); hdcBitmap = CreateCompatibleDC (0); - hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, himl->cx); + hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, cx); if (hbmNewBitmap == 0) ERR("creating new image bitmap (x=%d y=%d)!\n", sz.cx, cy); @@ -247,7 +249,7 @@ nImageCount = bmp.bmWidth / himl->cx; - IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmHeight); + IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmWidth, bmp.bmHeight); hdcBitmap = CreateCompatibleDC(0); @@ -349,7 +351,7 @@ else nImageCount = 0; - IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmHeight); + IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmWidth, bmp.bmHeight); nIndex = himl->cCurImage; himl->cCurImage += nImageCount; @@ -2303,7 +2305,7 @@ if (nIndex == -1) { if (himl->cCurImage + 1 > himl->cMaxImage) - IMAGELIST_InternalExpandBitmaps (himl, 1, 0); + IMAGELIST_InternalExpandBitmaps (himl, 1, 0, 0); nIndex = himl->cCurImage; himl->cCurImage++; @@ -2905,3 +2907,47 @@ { return SetDIBColorTable(himl->hdcImage, uStartIndex, cEntries, prgb); } + +/************************************************************************* + * ImageList_CoCreateInstance [COMCTL32.@] + * + * Creates a new imagelist instance and returns an interface pointer to it. + * + * PARAMS + * rclsid [I] A reference to the CLSID (CLSID_ImageList). + * punkOuter [I] Pointer to IUnknown interface for aggregation, if desired + * riid [I] Identifier of the requested interface. + * ppv [O] Returns the address of the pointer requested, or NULL. + * + * RETURNS + * Success: S_OK. + * Failure: Error value. + */ +HRESULT WINAPI +ImageList_CoCreateInstance (REFCLSID rclsid, const IUnknown *punkOuter, REFIID riid, void **ppv) +{ + FIXME("STUB: %s %p %s %p\n", debugstr_guid(rclsid), punkOuter, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +/************************************************************************* + * HIMAGELIST_QueryInterface [COMCTL32.@] + * + * Returns a pointer to an IImageList or IImageList2 object for the given + * HIMAGELIST. + * + * PARAMS + * himl [I] Image list handle. + * riid [I] Identifier of the requested interface. + * ppv [O] Returns the address of the pointer requested, or NULL. + * + * RETURNS + * Success: S_OK. + * Failure: Error value. + */ +HRESULT WINAPI +HIMAGELIST_QueryInterface (HIMAGELIST himl, REFIID riid, void **ppv) +{ + FIXME("STUB: %p %s %p\n", himl, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -9727,7 +9727,7 @@ /*** * DESCRIPTION: - * Paints/Repaints the listview control. + * Paints/Repaints the listview control. Internal use. * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure @@ -9766,6 +9766,26 @@ return 0; } +/*** + * DESCRIPTION: + * Paints/Repaints the listview control, WM_PAINT handler. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] hdc : device context handle + * + * RETURN: + * Zero + */ +static inline LRESULT LISTVIEW_WMPaint(LISTVIEW_INFO *infoPtr, HDC hdc) +{ + TRACE("(hdc=%p)\n", hdc); + + if (!is_redrawing(infoPtr)) + return DefWindowProcW (infoPtr->hwndSelf, WM_PAINT, (WPARAM)hdc, 0); + + return LISTVIEW_Paint(infoPtr, hdc); +} /*** * DESCRIPTION: @@ -10802,7 +10822,7 @@ return LISTVIEW_PrintClient(infoPtr, (HDC)wParam, (DWORD)lParam); case WM_PAINT: - return LISTVIEW_Paint(infoPtr, (HDC)wParam); + return LISTVIEW_WMPaint(infoPtr, (HDC)wParam); case WM_RBUTTONDBLCLK: return LISTVIEW_RButtonDblClk(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); Modified: trunk/reactos/dll/win32/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshe…
============================================================================== --- trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -904,7 +904,7 @@ */ hwndButton = GetDlgItem(hwndParent, IDCANCEL); - x = rcSheet.right - ((padding.x + buttonWidth) * (num_buttons - 1)); + x += padding.x + buttonWidth; SetWindowPos(hwndButton, 0, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); @@ -914,34 +914,25 @@ */ hwndButton = GetDlgItem(hwndParent, IDC_APPLY_BUTTON); - if (psInfo->hasApply) - { - if (psInfo->hasHelp) - x = rcSheet.right - ((padding.x + buttonWidth) * 2); - else - x = rcSheet.right - (padding.x + buttonWidth); - - SetWindowPos(hwndButton, 0, x, y, 0, 0, - SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); - - EnableWindow(hwndButton, FALSE); - } + if(psInfo->hasApply) + x += padding.x + buttonWidth; else ShowWindow(hwndButton, SW_HIDE); + SetWindowPos(hwndButton, 0, x, y, 0, 0, + SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); + EnableWindow(hwndButton, FALSE); + /* * Position Help button. */ hwndButton = GetDlgItem(hwndParent, IDHELP); - if (psInfo->hasHelp) - { - x = rcSheet.right - (padding.x + buttonWidth); - - SetWindowPos(hwndButton, 0, x, y, 0, 0, - SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); - } - else + x += padding.x + buttonWidth; + SetWindowPos(hwndButton, 0, x, y, 0, 0, + SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); + + if(!psInfo->hasHelp) ShowWindow(hwndButton, SW_HIDE); return TRUE; @@ -1549,6 +1540,7 @@ { HWND hwndTabCtrl; HWND hwndLineHeader; + HWND control; LPCPROPSHEETPAGEW ppshpage; TRACE("active_page %d, index %d\n", psInfo->active_page, index); @@ -1569,6 +1561,10 @@ { PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags, psInfo->proppage[index].pszText); + + control = GetNextDlgTabItem(psInfo->proppage[index].hwndPage, NULL, FALSE); + if(control != NULL) + SetFocus(control); } if (psInfo->active_page != -1) @@ -1631,7 +1627,11 @@ if (idx >= 0 && idx < psInfo->nPages) { if (PROPSHEET_CanSetCurSel(hwndDlg)) + { + SetFocus(GetDlgItem(hwndDlg, IDC_BACK_BUTTON)); + SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0); PROPSHEET_SetCurSel(hwndDlg, idx, -1, 0); + } } return TRUE; } @@ -1669,7 +1669,11 @@ if (idx < psInfo->nPages ) { if (PROPSHEET_CanSetCurSel(hwndDlg) != FALSE) + { + SetFocus(GetDlgItem(hwndDlg, IDC_NEXT_BUTTON)); + SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0); PROPSHEET_SetCurSel(hwndDlg, idx, 1, 0); + } } return TRUE; @@ -3444,6 +3448,7 @@ /* set up the Next and Back buttons by default */ PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT); + SetFocus(GetDlgItem(hwnd, IDC_NEXT_BUTTON)); /* Set up fonts */ SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0); @@ -3528,7 +3533,11 @@ * from which to switch to the next page */ SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0); - PROPSHEET_UnChanged(hwnd, (HWND)wParam); + PROPSHEET_UnChanged(hwnd, NULL); + + /* wizards set their focus during init */ + if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) + return FALSE; return TRUE; } Modified: trunk/reactos/dll/win32/comctl32/status.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.…
============================================================================== --- trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -1016,12 +1016,17 @@ len = strlenW (infoPtr->parts[0].text); - if (size > len) { + if (!size) + return len; + else if (size > len) { strcpyW (buf, infoPtr->parts[0].text); return len; } - - return -1; + else { + memcpy (buf, infoPtr->parts[0].text, (size - 1) * sizeof(WCHAR)); + buf[size - 1] = 0; + return size - 1; + } } Modified: trunk/reactos/dll/win32/comctl32/tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?r…
============================================================================== --- trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -2810,8 +2810,16 @@ TRACE("(%p,%d,%p,%s)\n", infoPtr, iItem, tabItem, bUnicode ? "true" : "false"); + if (!tabItem) return FALSE; + if (iItem < 0 || iItem >= infoPtr->uNumItem) + { + /* init requested fields */ + if (tabItem->mask & TCIF_IMAGE) tabItem->iImage = 0; + if (tabItem->mask & TCIF_PARAM) tabItem->lParam = 0; + if (tabItem->mask & TCIF_STATE) tabItem->dwState = 0; return FALSE; + } wineItem = TAB_GetItem(infoPtr, iItem); Modified: trunk/reactos/dll/win32/comctl32/trackbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackba…
============================================================================== --- trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -52,6 +52,7 @@ typedef struct { HWND hwndSelf; + DWORD dwStyle; LONG lRangeMin; LONG lRangeMax; LONG lLineSize; @@ -137,7 +138,7 @@ static BOOL notify_with_scroll (const TRACKBAR_INFO *infoPtr, UINT code) { - BOOL bVert = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT; + BOOL bVert = infoPtr->dwStyle & TBS_VERT; TRACE("%x\n", code); @@ -151,8 +152,12 @@ int tic; unsigned nrTics, i; - if (infoPtr->uTicFreq && infoPtr->lRangeMax >= infoPtr->lRangeMin) - nrTics=(infoPtr->lRangeMax - infoPtr->lRangeMin)/infoPtr->uTicFreq; + if (infoPtr->uTicFreq && infoPtr->lRangeMax >= infoPtr->lRangeMin) { + nrTics=(infoPtr->lRangeMax - infoPtr->lRangeMin)/infoPtr->uTicFreq; + /* don't add extra tic if there's no remainder */ + if ((infoPtr->lRangeMax - infoPtr->lRangeMin) % infoPtr->uTicFreq == 0) + nrTics--; + } else { Free (infoPtr->tics); infoPtr->tics = NULL; @@ -180,12 +185,12 @@ (in range of trackbar) */ static inline LONG -TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place, int vertical) +TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place) { double range, width, pos, offsetthumb; range = infoPtr->lRangeMax - infoPtr->lRangeMin; - if (vertical) { + if (infoPtr->dwStyle & TBS_VERT) { offsetthumb = (infoPtr->rcThumb.bottom - infoPtr->rcThumb.top)/2; width = infoPtr->rcChannel.bottom - infoPtr->rcChannel.top - (offsetthumb * 2) - 1; pos = (range*(place - infoPtr->rcChannel.top - offsetthumb)) / width; @@ -209,10 +214,9 @@ static LONG TRACKBAR_GetAutoPageDirection (const TRACKBAR_INFO *infoPtr, POINT clickPoint) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); RECT pageRect; - if (dwStyle & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { pageRect.top = infoPtr->rcChannel.top; pageRect.bottom = infoPtr->rcChannel.bottom; pageRect.left = infoPtr->rcThumb.left; @@ -227,10 +231,10 @@ if (PtInRect(&pageRect, clickPoint)) { - int clickPlace = (dwStyle & TBS_VERT) ? clickPoint.y : clickPoint.x; - - LONG clickPos = TRACKBAR_ConvertPlaceToPosition(infoPtr, clickPlace, - dwStyle & TBS_VERT); + int clickPlace = (infoPtr->dwStyle & TBS_VERT) ? clickPoint.y : clickPoint.x; + + LONG clickPos = TRACKBAR_ConvertPlaceToPosition(infoPtr, clickPlace); + return clickPos - infoPtr->lPos; } @@ -281,7 +285,6 @@ static void TRACKBAR_CalcChannel (TRACKBAR_INFO *infoPtr) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); INT cyChannel, offsetthumb, offsetedge; RECT lpRect, *channel = & infoPtr->rcChannel; @@ -289,22 +292,22 @@ offsetthumb = infoPtr->uThumbLen / 4; offsetedge = offsetthumb + 3; - cyChannel = (dwStyle & TBS_ENABLESELRANGE) ? offsetthumb*3 : 4; - if (dwStyle & TBS_VERT) { + cyChannel = (infoPtr->dwStyle & TBS_ENABLESELRANGE) ? offsetthumb*3 : 4; + if (infoPtr->dwStyle & TBS_VERT) { channel->top = lpRect.top + offsetedge; channel->bottom = lpRect.bottom - offsetedge; - if (dwStyle & TBS_ENABLESELRANGE) + if (infoPtr->dwStyle & TBS_ENABLESELRANGE) channel->left = lpRect.left + ((infoPtr->uThumbLen - cyChannel + 2) / 2); else channel->left = lpRect.left + (infoPtr->uThumbLen / 2) - 1; - if (dwStyle & TBS_BOTH) { - if (dwStyle & TBS_NOTICKS) + if (infoPtr->dwStyle & TBS_BOTH) { + if (infoPtr->dwStyle & TBS_NOTICKS) channel->left += 1; else channel->left += 9; } - else if (dwStyle & TBS_TOP) { - if (dwStyle & TBS_NOTICKS) + else if (infoPtr->dwStyle & TBS_TOP) { + if (infoPtr->dwStyle & TBS_NOTICKS) channel->left += 2; else channel->left += 10; @@ -313,18 +316,18 @@ } else { channel->left = lpRect.left + offsetedge; channel->right = lpRect.right - offsetedge; - if (dwStyle & TBS_ENABLESELRANGE) + if (infoPtr->dwStyle & TBS_ENABLESELRANGE) channel->top = lpRect.top + ((infoPtr->uThumbLen - cyChannel + 2) / 2); else channel->top = lpRect.top + (infoPtr->uThumbLen / 2) - 1; - if (dwStyle & TBS_BOTH) { - if (dwStyle & TBS_NOTICKS) + if (infoPtr->dwStyle & TBS_BOTH) { + if (infoPtr->dwStyle & TBS_NOTICKS) channel->top += 1; else channel->top += 9; } - else if (dwStyle & TBS_TOP) { - if (dwStyle & TBS_NOTICKS) + else if (infoPtr->dwStyle & TBS_TOP) { + if (infoPtr->dwStyle & TBS_NOTICKS) channel->top += 2; else channel->top += 10; @@ -337,7 +340,6 @@ TRACKBAR_CalcThumb (const TRACKBAR_INFO *infoPtr, LONG lPos, RECT *thumb) { int range, width, height, thumbwidth; - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); RECT lpRect; range = infoPtr->lRangeMax - infoPtr->lRangeMin; @@ -346,11 +348,11 @@ if (!range) range = 1; GetClientRect(infoPtr->hwndSelf, &lpRect); - if (dwStyle & TBS_VERT) + if (infoPtr->dwStyle & TBS_VERT) { height = infoPtr->rcChannel.bottom - infoPtr->rcChannel.top - thumbwidth; - if ((dwStyle & (TBS_BOTH | TBS_LEFT)) && !(dwStyle & TBS_NOTICKS)) + if ((infoPtr->dwStyle & (TBS_BOTH | TBS_LEFT)) && !(infoPtr->dwStyle & TBS_NOTICKS)) thumb->left = 10; else thumb->left = 2; @@ -366,7 +368,7 @@ thumb->left = infoPtr->rcChannel.left + (width*(lPos - infoPtr->lRangeMin))/range; thumb->right = thumb->left + thumbwidth; - if ((dwStyle & (TBS_BOTH | TBS_TOP)) && !(dwStyle & TBS_NOTICKS)) + if ((infoPtr->dwStyle & (TBS_BOTH | TBS_TOP)) && !(infoPtr->dwStyle & TBS_NOTICKS)) thumb->top = 10; else thumb->top = 2; @@ -420,7 +422,7 @@ if (range <= 0) { SetRectEmpty (selection); } else { - if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { offsetthumb = (infoPtr->rcThumb.bottom - infoPtr->rcThumb.top)/2; height = infoPtr->rcChannel.bottom - infoPtr->rcChannel.top - offsetthumb*2; selection->top = infoPtr->rcChannel.top + offsetthumb + @@ -467,7 +469,7 @@ /* Trackbar drawing code. I like my spaghetti done milanese. */ static void -TRACKBAR_DrawChannel (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) +TRACKBAR_DrawChannel (const TRACKBAR_INFO *infoPtr, HDC hdc) { RECT rcChannel = infoPtr->rcChannel; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); @@ -475,13 +477,13 @@ if (theme) { DrawThemeBackground (theme, hdc, - (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ? + (infoPtr->dwStyle & TBS_VERT) ? TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcChannel, 0); } else { DrawEdge (hdc, &rcChannel, EDGE_SUNKEN, BF_RECT | BF_ADJUST); - if (dwStyle & TBS_ENABLESELRANGE) { /* fill the channel */ + if (infoPtr->dwStyle & TBS_ENABLESELRANGE) { /* fill the channel */ FillRect (hdc, &rcChannel, GetStockObject(WHITE_BRUSH)); if (TRACKBAR_HasSelection(infoPtr)) FillRect (hdc, &infoPtr->rcSelection, GetSysColorBrush(COLOR_HIGHLIGHT)); @@ -575,17 +577,17 @@ } static void -TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) +TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc) { unsigned int i; - int ticFlags = dwStyle & 0x0f; + int ticFlags = infoPtr->dwStyle & 0x0f; LOGPEN ticPen = { PS_SOLID, {1, 0}, GetSysColor (COLOR_3DDKSHADOW) }; HPEN hOldPen, hTicPen; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); if (theme) { - int part = (dwStyle & TBS_VERT) ? TKP_TICSVERT : TKP_TICS; + int part = (infoPtr->dwStyle & TBS_VERT) ? TKP_TICSVERT : TKP_TICS; GetThemeColor (theme, part, TSS_NORMAL, TMT_COLOR, &ticPen.lopnColor); } /* create the pen to draw the tics with */ @@ -599,7 +601,7 @@ TRACKBAR_DrawTic (infoPtr, hdc, infoPtr->lRangeMin, ticFlags | TIC_EDGE); TRACKBAR_DrawTic (infoPtr, hdc, infoPtr->lRangeMax, ticFlags | TIC_EDGE); - if ((dwStyle & TBS_ENABLESELRANGE) && TRACKBAR_HasSelection(infoPtr)) { + if ((infoPtr->dwStyle & TBS_ENABLESELRANGE) && TRACKBAR_HasSelection(infoPtr)) { TRACKBAR_DrawTic (infoPtr, hdc, infoPtr->lSelMin, ticFlags | TIC_SELECTIONMARKMIN); TRACKBAR_DrawTic (infoPtr, hdc, infoPtr->lSelMax, @@ -614,7 +616,7 @@ } static void -TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) +TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc) { HBRUSH oldbr; HPEN oldpen; @@ -630,14 +632,14 @@ { int partId; int stateId; - if (dwStyle & TBS_BOTH) - partId = (dwStyle & TBS_VERT) ? TKP_THUMBVERT : TKP_THUMB; - else if (dwStyle & TBS_LEFT) - partId = (dwStyle & TBS_VERT) ? TKP_THUMBLEFT : TKP_THUMBTOP; + if (infoPtr->dwStyle & TBS_BOTH) + partId = (infoPtr->dwStyle & TBS_VERT) ? TKP_THUMBVERT : TKP_THUMB; + else if (infoPtr->dwStyle & TBS_LEFT) + partId = (infoPtr->dwStyle & TBS_VERT) ? TKP_THUMBLEFT : TKP_THUMBTOP; else - partId = (dwStyle & TBS_VERT) ? TKP_THUMBRIGHT : TKP_THUMBBOTTOM; + partId = (infoPtr->dwStyle & TBS_VERT) ? TKP_THUMBRIGHT : TKP_THUMBBOTTOM; - if (dwStyle & WS_DISABLED) + if (infoPtr->dwStyle & WS_DISABLED) stateId = TUS_DISABLED; else if (infoPtr->flags & TB_DRAG_MODE) stateId = TUS_PRESSED; @@ -655,7 +657,7 @@ oldbr = SelectObject (hdc, GetSysColorBrush(fillClr)); SetPolyFillMode (hdc, WINDING); - if (dwStyle & TBS_BOTH) + if (infoPtr->dwStyle & TBS_BOTH) { points[0].x=thumb.right; points[0].y=thumb.top; @@ -672,10 +674,10 @@ } else { - if (dwStyle & TBS_VERT) + if (infoPtr->dwStyle & TBS_VERT) { PointDepth = (thumb.bottom - thumb.top) / 2; - if (dwStyle & TBS_LEFT) + if (infoPtr->dwStyle & TBS_LEFT) { points[0].x=thumb.right; points[0].y=thumb.top; @@ -710,7 +712,7 @@ else { PointDepth = (thumb.right - thumb.left) / 2; - if (dwStyle & TBS_TOP) + if (infoPtr->dwStyle & TBS_TOP) { points[0].x=(thumb.right - thumb.left) / 2 + thumb.left + 1; points[0].y=thumb.top; @@ -774,7 +776,6 @@ static void TRACKBAR_UpdateToolTip (const TRACKBAR_INFO *infoPtr) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); WCHAR buf[80]; static const WCHAR fmt[] = { '%', 'l', 'd', 0 }; TTTOOLINFOW ti; @@ -795,7 +796,7 @@ GetClientRect (infoPtr->hwndSelf, &rcClient); size = SendMessageW (infoPtr->hwndToolTip, TTM_GETBUBBLESIZE, 0, (LPARAM)&ti); - if (dwStyle & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { if (infoPtr->fLocation == TBTS_LEFT) pt.x = 0 - LOWORD(size) - TOOLTIP_OFFSET; else @@ -818,7 +819,6 @@ static void TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); RECT rcClient; HDC hdc; HBITMAP hOldBmp = 0, hOffScreenBmp = 0; @@ -885,14 +885,14 @@ icdrf = notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPREPAINT); } else icdrf = CDRF_DODEFAULT; if ( !(icdrf & CDRF_SKIPDEFAULT) ) { - TRACKBAR_DrawChannel (infoPtr, hdc, dwStyle); + TRACKBAR_DrawChannel (infoPtr, hdc); if (icdrf & CDRF_NOTIFYPOSTPAINT) notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPOSTPAINT); } /* draw tics */ - if (!(dwStyle & TBS_NOTICKS)) { + if (!(infoPtr->dwStyle & TBS_NOTICKS)) { if (gcdrf & CDRF_NOTIFYITEMDRAW) { nmcd.dwItemSpec = TBCD_TICS; nmcd.uItemState = CDIS_DEFAULT; @@ -900,14 +900,14 @@ icdrf = notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPREPAINT); } else icdrf = CDRF_DODEFAULT; if ( !(icdrf & CDRF_SKIPDEFAULT) ) { - TRACKBAR_DrawTics (infoPtr, hdc, dwStyle); + TRACKBAR_DrawTics (infoPtr, hdc); if (icdrf & CDRF_NOTIFYPOSTPAINT) notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPOSTPAINT); } } /* draw thumb */ - if (!(dwStyle & TBS_NOTHUMB)) { + if (!(infoPtr->dwStyle & TBS_NOTHUMB)) { if (gcdrf & CDRF_NOTIFYITEMDRAW) { nmcd.dwItemSpec = TBCD_THUMB; nmcd.uItemState = infoPtr->flags & TB_DRAG_MODE ? CDIS_HOT : CDIS_DEFAULT; @@ -915,7 +915,7 @@ icdrf = notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPREPAINT); } else icdrf = CDRF_DODEFAULT; if ( !(icdrf & CDRF_SKIPDEFAULT) ) { - TRACKBAR_DrawThumb(infoPtr, hdc, dwStyle); + TRACKBAR_DrawThumb(infoPtr, hdc); if (icdrf & CDRF_NOTIFYPOSTPAINT) notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPOSTPAINT); } @@ -944,7 +944,6 @@ static void TRACKBAR_AlignBuddies (const TRACKBAR_INFO *infoPtr) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); HWND hwndParent = GetParent (infoPtr->hwndSelf); RECT rcSelf, rcBuddy; INT x, y; @@ -957,7 +956,7 @@ GetWindowRect (infoPtr->hwndBuddyLA, &rcBuddy); MapWindowPoints (HWND_DESKTOP, hwndParent, (LPPOINT)&rcBuddy, 2); - if (dwStyle & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { x = (infoPtr->rcChannel.right + infoPtr->rcChannel.left) / 2 - (rcBuddy.right - rcBuddy.left) / 2 + rcSelf.left; y = rcSelf.top - (rcBuddy.bottom - rcBuddy.top); @@ -978,7 +977,7 @@ GetWindowRect (infoPtr->hwndBuddyRB, &rcBuddy); MapWindowPoints (HWND_DESKTOP, hwndParent, (LPPOINT)&rcBuddy, 2); - if (dwStyle & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { x = (infoPtr->rcChannel.right + infoPtr->rcChannel.left) / 2 - (rcBuddy.right - rcBuddy.left) / 2 + rcSelf.left; y = rcSelf.bottom; @@ -1039,13 +1038,9 @@ static inline LONG TRACKBAR_GetNumTics (const TRACKBAR_INFO *infoPtr) { - if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_NOTICKS) - return 0; - - if(infoPtr->uNumTics == 0) - return 2; - else - return infoPtr->uNumTics + 1; + if (infoPtr->dwStyle & TBS_NOTICKS) return 0; + + return infoPtr->uNumTics + 2; } @@ -1222,7 +1217,7 @@ static inline LRESULT TRACKBAR_SetSel (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lSel) { - if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_ENABLESELRANGE)){ + if (!(infoPtr->dwStyle & TBS_ENABLESELRANGE)){ infoPtr->lSelMin = 0; infoPtr->lSelMax = 0; return 0; @@ -1246,7 +1241,7 @@ static inline LRESULT TRACKBAR_SetSelEnd (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lEnd) { - if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_ENABLESELRANGE)){ + if (!(infoPtr->dwStyle & TBS_ENABLESELRANGE)){ infoPtr->lSelMax = 0; return 0; } @@ -1266,7 +1261,7 @@ static inline LRESULT TRACKBAR_SetSelStart (TRACKBAR_INFO *infoPtr, BOOL fRedraw, LONG lStart) { - if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_ENABLESELRANGE)){ + if (!(infoPtr->dwStyle & TBS_ENABLESELRANGE)){ infoPtr->lSelMin = 0; return 0; } @@ -1286,7 +1281,7 @@ static inline LRESULT TRACKBAR_SetThumbLength (TRACKBAR_INFO *infoPtr, UINT iLength) { - if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_FIXEDLENGTH) { + if (infoPtr->dwStyle & TBS_FIXEDLENGTH) { infoPtr->uThumbLen = iLength; infoPtr->flags |= TB_THUMBSIZECHANGED; InvalidateRect (infoPtr->hwndSelf, &infoPtr->rcThumb, FALSE); @@ -1299,7 +1294,7 @@ static inline LRESULT TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos) { - if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_AUTOTICKS) + if (infoPtr->dwStyle & TBS_AUTOTICKS) return FALSE; if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax)) @@ -1326,7 +1321,7 @@ static inline LRESULT TRACKBAR_SetTicFreq (TRACKBAR_INFO *infoPtr, WORD wFreq) { - if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_AUTOTICKS) { + if (infoPtr->dwStyle & TBS_AUTOTICKS) { infoPtr->uTicFreq = wFreq; TRACKBAR_RecalculateTics (infoPtr); TRACKBAR_InvalidateAll(infoPtr); @@ -1370,14 +1365,13 @@ static LRESULT TRACKBAR_InitializeThumb (TRACKBAR_INFO *infoPtr) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); RECT rect; int clientWidth, clientMetric; /* initial thumb length */ - clientMetric = (dwStyle & TBS_ENABLESELRANGE) ? 23 : 21; + clientMetric = (infoPtr->dwStyle & TBS_ENABLESELRANGE) ? 23 : 21; GetClientRect(infoPtr->hwndSelf,&rect); - if (dwStyle & TBS_VERT) { + if (infoPtr->dwStyle & TBS_VERT) { clientWidth = rect.right - rect.left; } else { clientWidth = rect.bottom - rect.top; @@ -1399,7 +1393,6 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) { TRACKBAR_INFO *infoPtr; - DWORD dwStyle; infoPtr = Alloc (sizeof(TRACKBAR_INFO)); if (!infoPtr) return -1; @@ -1407,6 +1400,7 @@ /* set default values */ infoPtr->hwndSelf = hwnd; + infoPtr->dwStyle = lpcs->style; infoPtr->lRangeMin = 0; infoPtr->lRangeMax = 100; infoPtr->lLineSize = 1; @@ -1422,10 +1416,8 @@ TRACKBAR_InitializeThumb (infoPtr); - dwStyle = GetWindowLongW (hwnd, GWL_STYLE); - /* Create tooltip control */ - if (dwStyle & TBS_TOOLTIPS) { + if (infoPtr->dwStyle & TBS_TOOLTIPS) { infoPtr->hwndToolTip = CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, WS_POPUP, @@ -1575,6 +1567,16 @@ return 0; } +static LRESULT +TRACKBAR_StyleChanged (TRACKBAR_INFO *infoPtr, WPARAM wStyleType, + const STYLESTRUCT *lpss) +{ + if (wStyleType != GWL_STYLE) return 0; + + infoPtr->dwStyle = lpss->styleNew; + + return 0; +} static LRESULT TRACKBAR_Timer (TRACKBAR_INFO *infoPtr) @@ -1602,8 +1604,7 @@ static LRESULT TRACKBAR_MouseMove (TRACKBAR_INFO *infoPtr, INT x, INT y) { - DWORD dwStyle = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); - INT clickPlace = (dwStyle & TBS_VERT) ? y : x; + INT clickPlace = (infoPtr->dwStyle & TBS_VERT) ? y : x; LONG dragPos, oldPos = infoPtr->lPos; TRACE("(x=%d. y=%d)\n", x, y); @@ -1647,8 +1648,8 @@ return TRUE; } - dragPos = TRACKBAR_ConvertPlaceToPosition (infoPtr, clickPlace, - dwStyle & TBS_VERT); + dragPos = TRACKBAR_ConvertPlaceToPosition (infoPtr, clickPlace); + if (dragPos == oldPos) return TRUE; infoPtr->lPos = dragPos; @@ -1666,9 +1667,8 @@ static BOOL TRACKBAR_KeyDown (TRACKBAR_INFO *infoPtr, INT nVirtKey) { - DWORD style = GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE); - BOOL downIsLeft = style & TBS_DOWNISLEFT; - BOOL vert = style & TBS_VERT; + BOOL downIsLeft = infoPtr->dwStyle & TBS_DOWNISLEFT; + BOOL vert = infoPtr->dwStyle & TBS_VERT; LONG pos = infoPtr->lPos; TRACE("%x\n", nVirtKey); @@ -1905,6 +1905,9 @@ case WM_SIZE: return TRACKBAR_Size (infoPtr); + case WM_STYLECHANGED: + return TRACKBAR_StyleChanged (infoPtr, wParam, (LPSTYLESTRUCT)lParam); + case WM_THEMECHANGED: return theme_changed (infoPtr); Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
============================================================================== --- trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] Sat Sep 5 17:01:30 2009 @@ -1150,7 +1150,7 @@ case WM_INITDIALOG: { FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam; - RECT rc; + RECT rc, rcstc; int gripx = GetSystemMetrics( SM_CYHSCROLL); int gripy = GetSystemMetrics( SM_CYVSCROLL); @@ -1183,6 +1183,18 @@ if(fodInfos->ofnInfos->Flags & OFN_EXPLORER) { SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE); SendCustomDlgNotificationMessage(hwnd,CDN_FOLDERCHANGE); + } + + /* if the app has changed the position of the invisible listbox, + * change that of the listview (browser) as well */ + GetWindowRect( fodInfos->ShellInfos.hwndView, &rc); + GetWindowRect( GetDlgItem( hwnd, IDC_SHELLSTATIC ), &rcstc); + if( !EqualRect( &rc, &rcstc)) + { + MapWindowPoints( NULL, hwnd, (LPPOINT) &rcstc, 2); + SetWindowPos( fodInfos->ShellInfos.hwndView, NULL, + rcstc.left, rcstc.top, rcstc.right - rcstc.left, rcstc.bottom - rcstc.top, + SWP_NOACTIVATE | SWP_NOZORDER); } if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
15 years, 3 months
1
0
0
0
[dchapyshev] 42992: - Sync headers with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 5 17:00:41 2009 New Revision: 42992 URL:
http://svn.reactos.org/svn/reactos?rev=42992&view=rev
Log: - Sync headers with Wine 1.1.29 Added: trunk/reactos/include/psdk/sti.h (with props) Modified: trunk/reactos/include/psdk/activscp.idl trunk/reactos/include/psdk/msctf.idl trunk/reactos/include/psdk/textstor.idl Modified: trunk/reactos/include/psdk/activscp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/activscp.idl?…
============================================================================== --- trunk/reactos/include/psdk/activscp.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/activscp.idl [iso-8859-1] Sat Sep 5 17:00:41 2009 @@ -40,8 +40,11 @@ cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED 0x00001003") cpp_quote("#define SCRIPTPROP_DEBUGGER 0x00001100") cpp_quote("#define SCRIPTPROP_JITDEBUG 0x00001101") -cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT 0x70000000") -cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK 0x70000001") +cpp_quote("#define SCRIPTPROP_INVOKEVERSIONING 0x00004000") + +cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT 0x70000000") +cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK 0x70000001") +cpp_quote("#define SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION 0x70000002") typedef enum tagSCRIPTSTATE { SCRIPTSTATE_UNINITIALIZED = 0, Modified: trunk/reactos/include/psdk/msctf.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msctf.idl?rev…
============================================================================== --- trunk/reactos/include/psdk/msctf.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/msctf.idl [iso-8859-1] Sat Sep 5 17:00:41 2009 @@ -34,9 +34,31 @@ cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)") cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)") +cpp_quote("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);") +cpp_quote("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);") +cpp_quote("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);") + +cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;") +cpp_quote("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);") +cpp_quote("EXTERN_C const GUID GUID_PROP_LANGID;") +cpp_quote("EXTERN_C const GUID GUID_PROP_READING;") +cpp_quote("EXTERN_C const GUID GUID_PROP_COMPOSING;") + cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;") cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;") cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;") +cpp_quote("DEFINE_GUID(CLSID_TF_DisplayAttributeMgr,0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53);") + +/* GUIDs for Compartments */ +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;") +cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;") /* GUIDs for Categories */ cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;") @@ -140,6 +162,17 @@ [out] ITfCompartmentMgr **ppCompMgr); }; +[ + object, + uuid(d7540241-f9a1-4364-befc-dbcd2c4395b7), + pointer_default(unique) +] +interface ITfCompositionView : IUnknown +{ + HRESULT GetOwnerClsid([out] CLSID *pclsid); + + HRESULT GetRange([out] ITfRange **ppRange); +} [ object, @@ -391,6 +424,109 @@ [in] HKL hKL); }; +typedef [uuid(c4cc07f1-80cc-4a7b-bc54-98512782cbe3)] +enum { + TF_LS_NONE = 0, + TF_LS_SOLID = 1, + TF_LS_DOT = 2, + TF_LS_DASH = 3, + TF_LS_SQUIGGLE = 4 +} TF_DA_LINESTYLE; + +typedef [uuid(d9b92e21-084a-401b-9c64-1e6dad91a1ab)] +enum { + TF_CT_NONE = 0, + TF_CT_SYSCOLOR = 1, + TF_CT_COLORREF = 2 +} TF_DA_COLORTYPE; + +typedef [uuid(90d0cb5e-6520-4a0f-b47c-c39bd955f0d6)] +struct TF_DA_COLOR { + TF_DA_COLORTYPE type; + [switch_type(TF_DA_COLORTYPE), switch_is(type)] + union { + [case(TF_CT_SYSCOLOR)] int nIndex; + [case(TF_CT_COLORREF)] COLORREF cr; + }; +} TF_DA_COLOR; + +typedef [uuid(33d2fe4b-6c24-4f67-8d75-3bc1819e4126)] +enum { + TF_ATTR_INPUT = 0, + TF_ATTR_TARGET_CONVERTED = 1, + TF_ATTR_CONVERTED = 2, + TF_ATTR_TARGET_NOTCONVERTED = 3, + TF_ATTR_INPUT_ERROR = 4, + TF_ATTR_FIXEDCONVERTED = 5, + TF_ATTR_OTHER = -1 +} TF_DA_ATTR_INFO; + +typedef [uuid(1bf1c305-419b-4182-a4d2-9bfadc3f021f)] +struct TF_DISPLAYATTRIBUTE { + TF_DA_COLOR crText; + TF_DA_COLOR crBk; + TF_DA_LINESTYLE lsStyle; + BOOL fBoldLine; + TF_DA_COLOR crLine; + TF_DA_ATTR_INFO bAttr; +} TF_DISPLAYATTRIBUTE; + +[ + object, + uuid(70528852-2f26-4aea-8c96-215150578932), + pointer_default(unique) +] +interface ITfDisplayAttributeInfo : IUnknown +{ + HRESULT GetGUID([out] GUID *pguid); + + HRESULT GetDescription([out] BSTR *pbstrDesc); + + HRESULT GetAttributeInfo([out] TF_DISPLAYATTRIBUTE *pda); + + HRESULT SetAttributeInfo([in] const TF_DISPLAYATTRIBUTE *pda); + + HRESULT Reset(); +} + +[ + object, + uuid(7cef04d7-cb75-4e80-a7ab-5f5bc7d332de), + pointer_default(unique) +] +interface IEnumTfDisplayAttributeInfo : IUnknown +{ + HRESULT Clone([out] IEnumTfDisplayAttributeInfo **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfDisplayAttributeInfo **rgInfo, + [out] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip([in] ULONG ulCount); +} + +[ + object, + local, + uuid(8ded7393-5db1-475c-9e71-a39111b0ff67), + pointer_default(unique) +] +interface ITfDisplayAttributeMgr : IUnknown +{ + HRESULT OnUpdateInfo(); + + HRESULT EnumDisplayAttributeInfo([out] IEnumTfDisplayAttributeInfo **ppEnum); + + HRESULT GetDisplayAttributeInfo( + [in] REFGUID guid, + [out] ITfDisplayAttributeInfo **ppInfo, + [out] CLSID *pclsidOwner); + +} + [ object, local, @@ -873,3 +1009,343 @@ HRESULT GetContext( [out] ITfContext **ppContext); }; + +[ + object, + uuid(057a6296-029b-4154-b79a-0d461d4ea94c), + pointer_default(unique) +] +interface ITfRangeACP : ITfRange +{ + HRESULT GetExtent([out] LONG *pacpAnchor, + [out] LONG *pcch); + + HRESULT SetExtent([in] LONG acpAnchor, + [in] LONG cch); +} + +[ + object, + uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c), + pointer_default(unique) +] +interface ITfInsertAtSelection : IUnknown +{ + const DWORD TF_IAS_NOQUERY = 0x1; + const DWORD TF_IAS_QUERYONLY = 0x2; + const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000; + + HRESULT InsertTextAtSelection( + [in] TfEditCookie ec, + [in] DWORD dwFlags, + [in, size_is(cch)] const WCHAR *pchText, + [in] LONG cch, + [out] ITfRange **ppRange); + + HRESULT InsertEmbeddedAtSelection( + [in] TfEditCookie ec, + [in] DWORD dwFlags, + [in] IDataObject *pDataObject, + [out] ITfRange **ppRange); +}; + +[ + object, + uuid(6834b120-88cb-11d2-bf45-00105a2799b5), + pointer_default(unique) +] +interface ITfPropertyStore : IUnknown +{ + const DWORD TF_TU_CORRECTION = 0x1; + + HRESULT GetType([out] GUID *pguid); + + HRESULT GetDataType([out] DWORD *pdwReserved); + + HRESULT GetData([out] VARIANT *pvarValue); + + HRESULT OnTextUpdated( + [in] DWORD dwFlags, + [in] ITfRange *pRangeNew, + [out] BOOL *pfAccept); + + HRESULT Shrink( + [in] ITfRange *pRangeNew, + [out] BOOL *pfFree); + + HRESULT Divide( + [in] ITfRange *pRangeThis, + [in] ITfRange *pRangeNew, + [out] ITfPropertyStore **ppPropStore); + + HRESULT Clone( + [out] ITfPropertyStore **pPropStore); + + HRESULT GetPropertyRangeCreator( + [out] CLSID *pclsid); + + HRESULT Serialize( + [in] IStream *pStream, + [out] ULONG *pcb); +} + +[ + object, + uuid(f99d3f40-8e32-11d2-bf46-00105a2799b5), + pointer_default(unique) +] +interface IEnumTfRanges : IUnknown +{ + HRESULT Clone([out] IEnumTfRanges **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfRange **ppRange, + [out] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip(ULONG ulCount); +} + +[ + object, + uuid(5efd22Ba-7838-46cb-88e2-cadb14124f8f), + pointer_default(unique) +] +interface IEnumITfCompositionView : IUnknown +{ + HRESULT Clone([out] IEnumITfCompositionView **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfCompositionView **rgCompositionView, + [out] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip([in] ULONG ulCount); +} + +[ + object, + uuid(20168d64-5a8f-4a5a-b7bd-cfa29f4D0fd9), + pointer_default(unique) +] +interface ITfComposition : IUnknown +{ + HRESULT GetRange([out] ITfRange **ppRange); + + HRESULT ShiftStart( + [in] TfEditCookie ecWrite, + [in] ITfRange *pNewStart); + + HRESULT ShiftEnd( + [in] TfEditCookie ecWrite, + [in] ITfRange *pNewEnd); + + HRESULT EndComposition([in] TfEditCookie ecWrite); +} + +[ + object, + uuid(a781718c-579a-4b15-a280-32b8577acc5e), + pointer_default(unique) +] +interface ITfCompositionSink : IUnknown +{ + HRESULT OnCompositionTerminated( + [in] TfEditCookie ecWrite, + [in] ITfComposition *pComposition); +} + +[ + object, + uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b), + pointer_default(unique) +] +interface ITfContextComposition : IUnknown +{ + HRESULT StartComposition( + [in] TfEditCookie ecWrite, + [in] ITfRange *pCompositionRange, + [in] ITfCompositionSink *pSink, + [out] ITfComposition **ppComposition); + + HRESULT EnumCompositions([out] IEnumITfCompositionView **ppEnum); + + HRESULT FindComposition( + [in] TfEditCookie ecRead, + [in] ITfRange *pTestRange, + [out] IEnumITfCompositionView **ppEnum); + + HRESULT TakeOwnership( + [in] TfEditCookie ecWrite, + [in] ITfCompositionView *pComposition, + [in] ITfCompositionSink *pSink, + [out] ITfComposition **ppComposition); +} + +[ + object, + uuid(86462810-593b-4916-9764-19c08e9ce110), + pointer_default(unique) +] +interface ITfContextOwnerCompositionServices : ITfContextComposition +{ + HRESULT TerminateComposition([in] ITfCompositionView *pComposition); +} + +[ + object, + uuid(17d49a3d-f8b8-4b2f-b254-52319dd64c53), + pointer_default(unique) +] +interface ITfReadOnlyProperty : IUnknown +{ + HRESULT GetType([out] GUID *pguid); + + HRESULT EnumRanges( + [in] TfEditCookie ec, + [out] IEnumTfRanges **ppEnum, + [in] ITfRange *pTargetRange); + + HRESULT GetValue( + [in] TfEditCookie ec, + [in] ITfRange *pRange, + [out] VARIANT *pvarValue); + + HRESULT GetContext([out] ITfContext **ppContext); +} + +[ + object, + uuid(e2449660-9542-11d2-bf46-00105a2799b5), + pointer_default(unique) +] +interface ITfProperty : ITfReadOnlyProperty +{ + HRESULT FindRange( + [in] TfEditCookie ec, + [in] ITfRange *pRange, + [out] ITfRange **ppRange, + [in] TfAnchor aPos); + + HRESULT SetValueStore( + [in] TfEditCookie ec, + [in] ITfRange *pRange, + [in] ITfPropertyStore *pPropStore); + + HRESULT SetValue( + [in] TfEditCookie ec, + [in] ITfRange *pRange, + [in] const VARIANT *pvarValue); + + HRESULT Clear( + [in] TfEditCookie ec, + [in] ITfRange *pRange); +} + +[ + object, + uuid(bb08f7a9-607a-4384-8623-056892b64371), + pointer_default(unique) +] +interface ITfCompartment : IUnknown +{ + HRESULT SetValue( + [in] TfClientId tid, + [in] const VARIANT *pvarValue); + + HRESULT GetValue( + [out] VARIANT *pvarValue); +}; + +[ + object, + uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c), + pointer_default(unique) +] +interface ITfCompartmentMgr : IUnknown +{ + HRESULT GetCompartment( + [in] REFGUID rguid, + [out] ITfCompartment **ppcomp); + + HRESULT ClearCompartment( + [in] TfClientId tid, + [in] REFGUID rguid); + + HRESULT EnumCompartments( + [out] IEnumGUID **ppEnum); +}; + +[ + object, + uuid(743abd5f-f26d-48df-8cc5-238492419b64), + pointer_default(unique) +] +interface ITfCompartmentEventSink : IUnknown +{ + HRESULT OnChange( + [in] REFGUID rguid); +} + +[ + object, + uuid(8f1a7ea6-1654-4502-a86e-b2902344d507), + pointer_default(unique) +] +interface IEnumTfContexts : IUnknown +{ + HRESULT Clone( + [out] IEnumTfContexts **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext, + [out] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip( + [in] ULONG ulCount); +}; + +[ + object, + uuid(aa80e808-2021-11d2-93e0-0060b067b86e), + pointer_default(unique) +] +interface IEnumTfDocumentMgrs : IUnknown +{ + HRESULT Clone( + [out] IEnumTfDocumentMgrs **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr, + [out] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip( + [in] ULONG ulCount); +}; + +[ + object, + uuid(73131f9c-56a9-49dd-b0ee-d046633f7528), + pointer_default(unique) +] +interface ITfSourceSingle : IUnknown +{ + HRESULT AdviseSingleSink( + [in] TfClientId tid, + [in] REFIID riid, + [in, iid_is(riid)] IUnknown *punk); + + HRESULT UnadviseSingleSink( + [in] TfClientId tid, + [in] REFIID riid); +}; Added: trunk/reactos/include/psdk/sti.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sti.h?rev=429…
============================================================================== --- trunk/reactos/include/psdk/sti.h (added) +++ trunk/reactos/include/psdk/sti.h [iso-8859-1] Sat Sep 5 17:00:41 2009 @@ -1,0 +1,40 @@ +/* + * Copyright (C) 2009 Damjan Jovanovic + * + * 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_STI_H +#define __WINE_STI_H + +#include <objbase.h> +/* #include <stireg.h> */ +/* #include <stierr.h> */ + +#include <pshpack8.h> + +#ifdef __cplusplus +extern "C" { +#endif + +DEFINE_GUID(CLSID_Sti, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C); + +#ifdef __cplusplus +}; +#endif + +#include <poppack.h> + +#endif /* __WINE_STI_H */ Propchange: trunk/reactos/include/psdk/sti.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/psdk/textstor.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/textstor.idl?…
============================================================================== --- trunk/reactos/include/psdk/textstor.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/textstor.idl [iso-8859-1] Sat Sep 5 17:00:41 2009 @@ -20,8 +20,19 @@ import "oaidl.idl"; #endif +cpp_quote("#define TS_E_INVALIDPOS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)") +cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)") +cpp_quote("#define TS_E_NOOBJECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)") +cpp_quote("#define TS_E_NOSERVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)") +cpp_quote("#define TS_E_NOINTERFACE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)") +cpp_quote("#define TS_E_NOSELECTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)") +cpp_quote("#define TS_E_NOLAYOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)") +cpp_quote("#define TS_E_INVALIDPOINT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)") +cpp_quote("#define TS_E_SYNCHRONOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)") cpp_quote("#define TS_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)") -cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)") +cpp_quote("#define TS_E_FORMAT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)") + +cpp_quote("#define TS_S_ASYNC MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)") const ULONG TS_DEFAULT_SELECTION = ~0u; @@ -49,6 +60,9 @@ const WCHAR TS_CHAR_EMBEDDED = 0xfffc; const WCHAR TS_CHAR_REGION = 0x0000; const WCHAR TS_CHAR_REPLACEMENT = 0xfffd; + +const DWORD TS_IAS_NOQUERY = 0x1; +const DWORD TS_IAS_QUERYONLY = 0x2; typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd; typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
15 years, 3 months
1
0
0
0
[khornicek] 42991: - update wined3d to Wine 1.1.29 - reapply our hack for releasing fake GL context, fixes bug 4836 See issue #4836 for more details.
by khornicek@svn.reactos.org
Author: khornicek Date: Fri Sep 4 11:38:44 2009 New Revision: 42991 URL:
http://svn.reactos.org/svn/reactos?rev=42991&view=rev
Log: - update wined3d to Wine 1.1.29 - reapply our hack for releasing fake GL context, fixes bug 4836 See issue #4836 for more details. Modified: trunk/reactos/dll/directx/wine/wined3d/arb_program_shader.c trunk/reactos/dll/directx/wine/wined3d/directx.c Modified: trunk/reactos/dll/directx/wine/wined3d/arb_program_shader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/a…
============================================================================== --- trunk/reactos/dll/directx/wine/wined3d/arb_program_shader.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/wined3d/arb_program_shader.c [iso-8859-1] Fri Sep 4 11:38:44 2009 @@ -2994,6 +2994,8 @@ static GLuint create_arb_blt_vertex_program(const struct wined3d_gl_info *gl_info) { GLuint program_id = 0; + GLint pos; + const char *blt_vprogram = "!!ARBvp1.0\n" "PARAM c[1] = { { 1, 0.5 } };\n" @@ -3004,14 +3006,24 @@ GL_EXTCALL(glGenProgramsARB(1, &program_id)); GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, program_id)); - GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(blt_vprogram), blt_vprogram)); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint pos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(blt_vprogram), blt_vprogram)); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + if (pos != -1) + { FIXME("Vertex program error at position %d: %s\n", pos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); + } return program_id; } @@ -3020,6 +3032,8 @@ static GLuint create_arb_blt_fragment_program(const struct wined3d_gl_info *gl_info, enum tex_types tex_type) { GLuint program_id = 0; + GLint pos; + static const char * const blt_fprograms[tex_type_count] = { /* tex_1d */ @@ -3054,13 +3068,23 @@ GL_EXTCALL(glGenProgramsARB(1, &program_id)); GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, program_id)); - GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(blt_fprograms[tex_type]), blt_fprograms[tex_type])); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint pos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(blt_fprograms[tex_type]), blt_fprograms[tex_type])); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + if (pos != -1) + { FIXME("Fragment program error at position %d: %s\n", pos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); + } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); } return program_id; @@ -3214,6 +3238,7 @@ BOOL dcl_tmp = args->super.srgb_correction, dcl_td = FALSE; BOOL want_nv_prog = FALSE; struct arb_pshader_private *shader_priv = This->backend_priv; + GLint errPos; DWORD map; char srgbtmp[4][4]; @@ -3497,13 +3522,22 @@ /* Create the program and check for errors */ GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, buffer->bsize, buffer->buffer)); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint errPos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); + if (errPos != -1) + { FIXME("HW PixelShader Error at position %d: %s\n", errPos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); retval = 0; + } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); } /* Load immediate constants */ @@ -3781,6 +3815,7 @@ DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This); struct shader_arb_ctx_priv priv_ctx; unsigned int i; + GLint errPos; memset(&priv_ctx, 0, sizeof(priv_ctx)); priv_ctx.cur_vs_args = args; @@ -3890,14 +3925,23 @@ /* Create the program and check for errors */ GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, buffer->bsize, buffer->buffer)); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint errPos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); + if (errPos != -1) + { FIXME("HW VertexShader Error at position %d: %s\n", errPos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); ret = -1; - } else { + } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); + /* Load immediate constants */ if(lconst_map) { LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { @@ -5486,6 +5530,7 @@ BOOL tempreg_used = FALSE, tfactor_used = FALSE; BOOL op_equal; const char *final_combiner_src = "ret"; + GLint pos; /* Find out which textures are read */ for(stage = 0; stage < MAX_TEXTURES; stage++) { @@ -5719,14 +5764,25 @@ /* Generate the shader */ GL_EXTCALL(glGenProgramsARB(1, &ret)); GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, ret)); - GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(buffer.buffer), buffer.buffer)); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint pos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(buffer.buffer), buffer.buffer)); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + if (pos != -1) + { FIXME("Fragment program error at position %d: %s\n", pos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); + } + shader_buffer_free(&buffer); return ret; } @@ -6305,6 +6361,7 @@ struct wined3d_shader_buffer buffer; char luminance_component; struct arbfp_blit_priv *priv = device->blit_priv; + GLint pos; /* Shader header */ if (!shader_buffer_init(&buffer)) @@ -6407,14 +6464,25 @@ shader_addline(&buffer, "END\n"); ENTER_GL(); - GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(buffer.buffer), buffer.buffer)); - - if (glGetError() == GL_INVALID_OPERATION) { - GLint pos; - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(buffer.buffer), buffer.buffer)); + checkGLcall("glProgramStringARB()"); + + glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); + if (pos != -1) + { FIXME("Fragment program error at position %d: %s\n", pos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB))); } + else + { + GLint native; + + GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); + checkGLcall("glGetProgramivARB()"); + if (!native) WARN("Program exceeds native resource limits.\n"); + } + shader_buffer_free(&buffer); LEAVE_GL(); Modified: trunk/reactos/dll/directx/wine/wined3d/directx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/d…
============================================================================== --- trunk/reactos/dll/directx/wine/wined3d/directx.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/wined3d/directx.c [iso-8859-1] Fri Sep 4 11:38:44 2009 @@ -235,13 +235,13 @@ { ERR_(d3d_caps)("Failed to disable fake GL context.\n"); } - +#if 0 if (!pwglDeleteContext(ctx->gl_ctx)) { DWORD err = GetLastError(); ERR("wglDeleteContext(%p) failed, last error %#x.\n", ctx->gl_ctx, err); } - +#endif ReleaseDC(ctx->wnd, ctx->dc); DestroyWindow(ctx->wnd); } @@ -1481,6 +1481,7 @@ TRACE_(d3d_caps)("GL_RENDERER: %s.\n", debugstr_a(gl_string)); if (!gl_string) { + LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_RENDERER.\n"); return FALSE; } @@ -1489,6 +1490,7 @@ gl_renderer = HeapAlloc(GetProcessHeap(), 0, len); if (!gl_renderer) { + LEAVE_GL(); ERR_(d3d_caps)("Failed to allocate gl_renderer memory.\n"); return FALSE; } @@ -1498,6 +1500,7 @@ TRACE_(d3d_caps)("GL_VENDOR: %s.\n", debugstr_a(gl_string)); if (!gl_string) { + LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_VENDOR.\n"); HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; @@ -1510,6 +1513,7 @@ TRACE_(d3d_caps)("GL_VERSION: %s.\n", debugstr_a(gl_string)); if (!gl_string) { + LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_VERSION.\n"); HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; @@ -1560,10 +1564,13 @@ GL_Extensions = (const char *)glGetString(GL_EXTENSIONS); if (!GL_Extensions) { + LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_EXTENSIONS.\n"); HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; } + + LEAVE_GL(); TRACE_(d3d_caps)("GL_Extensions reported:\n"); @@ -1595,8 +1602,6 @@ } } } - - LEAVE_GL(); /* Now work out what GL support this card really has */ #define USE_GL_FUNC(type, pfn, ext, replace) \
15 years, 3 months
1
0
0
0
[dchapyshev] 42990: - Handle memory allocation failure. Found by amine48rz
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Sep 3 17:30:38 2009 New Revision: 42990 URL:
http://svn.reactos.org/svn/reactos?rev=42990&view=rev
Log: - Handle memory allocation failure. Found by amine48rz Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c [iso-8859-1] Thu Sep 3 17:30:38 2009 @@ -40,6 +40,12 @@ pdriver->driver_desc.dev_protocol = 2; // Protocol Info. pdriver->driver_ext = usb_alloc_mem(NonPagedPool, sizeof(MOUSE_DRVR_EXTENSION)); + if (!pdriver->driver_ext) + { + usb_dbg_print(DBGLVL_MAXIMUM, ("mouse_driver_init(): memory allocation failed!\n")); + return FALSE; + } + pdriver->driver_ext_size = sizeof(MOUSE_DRVR_EXTENSION); RtlZeroMemory(pdriver->driver_ext, sizeof(MOUSE_DRVR_EXTENSION));
15 years, 3 months
1
0
0
0
[dchapyshev] 42989: - Sync gdiplus with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Sep 3 17:07:25 2009 New Revision: 42989 URL:
http://svn.reactos.org/svn/reactos?rev=42989&view=rev
Log: - Sync gdiplus with Wine 1.1.29 Modified: trunk/reactos/dll/win32/gdiplus/brush.c trunk/reactos/dll/win32/gdiplus/gdiplus.c trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild trunk/reactos/dll/win32/gdiplus/gdiplus.spec trunk/reactos/dll/win32/gdiplus/gdiplus_private.h trunk/reactos/dll/win32/gdiplus/graphics.c trunk/reactos/dll/win32/gdiplus/image.c trunk/reactos/dll/win32/gdiplus/imageattributes.c trunk/reactos/dll/win32/gdiplus/region.c trunk/reactos/include/psdk/gdiplusflat.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/gdiplus/brush.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/brush.c?…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus_…
Modified: trunk/reactos/dll/win32/gdiplus/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
Modified: trunk/reactos/dll/win32/gdiplus/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/image.c?…
Modified: trunk/reactos/dll/win32/gdiplus/imageattributes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/imageatt…
Modified: trunk/reactos/dll/win32/gdiplus/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/region.c…
Modified: trunk/reactos/include/psdk/gdiplusflat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/gdiplusflat.h…
15 years, 3 months
1
0
0
0
[dreimer] 42988: Bug 4795: Japanese translation for paint by pcds90net, Tomoya Kitagawa Bug 4828: updates for slovak and translation for rapps by Mario Kacmar
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Sep 3 17:05:10 2009 New Revision: 42988 URL:
http://svn.reactos.org/svn/reactos?rev=42988&view=rev
Log: Bug 4795: Japanese translation for paint by pcds90net, Tomoya Kitagawa Bug 4828: updates for slovak and translation for rapps by Mario Kacmar Added: trunk/reactos/base/applications/paint/lang/ja-JP.rc (with props) trunk/reactos/base/applications/rapps/lang/sk-SK.rc (with props) Modified: trunk/reactos/base/applications/calc/lang/sk-SK.rc trunk/reactos/base/applications/paint/rsrc.rc trunk/reactos/base/applications/rapps/rsrc.rc trunk/reactos/dll/cpl/mmsys/lang/sk-SK.rc Modified: trunk/reactos/base/applications/calc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
============================================================================== --- trunk/reactos/base/applications/calc/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/lang/sk-SK.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -1,6 +1,6 @@ /* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario (kario(a)szm.sk) * DATE OF TR.: 30-01-2008 - * LAST CHANGE: 27-01-2009 + * LAST CHANGE: 29-08-2009 * --------------------------------------- * TODO: * 1. treba usporiada jednotky pod¾a abecedy @@ -522,24 +522,24 @@ // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN + IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakúzsky iling" IDS_CURRENCY_BELGIAN_FRANC "Belgický frank" IDS_CURRENCY_CYPRIOT_POUND "Cyperská libra" IDS_CURRENCY_CZECH_KORUNA "Èeská koruna" + IDS_CURRENCY_DEUTSCHE_MARK "Nemecká marka" + IDS_CURRENCY_DUTCH_GUILDER "Holandský gulden" IDS_CURRENCY_EURO "Euro" IDS_CURRENCY_FINNISH_MARKKA "Finská marka" IDS_CURRENCY_FRENCH_FRANC "Francúzsky frank" IDS_CURRENCY_GREEK_DRACHMA "Grécka drachma" - IDS_CURRENCY_DUTCH_GUILDER "Holandský gulden" IDS_CURRENCY_IRISH_POUND "Irish pound" + IDS_CURRENCY_ITALIAN_LIRA "Italian lira" IDS_CURRENCY_LUXEMBOURG_FRANC "Luxembourg franc" IDS_CURRENCY_MALTESE_LIRA "Maltese lira" - IDS_CURRENCY_DEUTSCHE_MARK "Nemecká marka" IDS_CURRENCY_PORTOGUESE_ESCUDO "Portoguese escudo" - IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakúzsky iling" IDS_CURRENCY_SLOVAK_KORUNA "Slovenská koruna" IDS_CURRENCY_SLOVENIAN_TOLAR "Slovinský toliar" IDS_CURRENCY_SPANISH_PESETA "panielska peseta" - IDS_CURRENCY_ITALIAN_LIRA "Talianska líra" END // TYPES OF ENERGIES @@ -571,10 +571,14 @@ IDS_LENGTH_CHOU "Chou" IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" + IDS_LENGTH_FATHOMS "Siahy" + IDS_LENGTH_FATHOMS_HUNGARY "Siahy (Maïarsko)" + IDS_LENGTH_FEET "Stopy" IDS_LENGTH_FURLONGS "Furlongs" IDS_LENGTH_GAN "Gan" IDS_LENGTH_HANDS "Hands" IDS_LENGTH_HUNH "Hunh" + IDS_LENGTH_INCHES "Palce" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" IDS_LENGTH_KABIET "Kabiet" @@ -582,6 +586,7 @@ IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometre" IDS_LENGTH_LAR "Lar" + IDS_LENGTH_LIGHT_YEARS "Svetelné roky" IDS_LENGTH_LINKS_UK "Links (UK)" IDS_LENGTH_METERS "Metre" IDS_LENGTH_MICRONS "Mikróny" @@ -589,7 +594,6 @@ IDS_LENGTH_MILLIMETERS "Milimetre" IDS_LENGTH_NAUTICAL_MILES "Námorné míle" IDS_LENGTH_NIEU "Nieu" - IDS_LENGTH_INCHES "Palce" IDS_LENGTH_PARSECS "Parsecy" IDS_LENGTH_PICAS "Picas" IDS_LENGTH_RI_JAPAN "Ri (Japonsko)" @@ -598,12 +602,8 @@ IDS_LENGTH_SAWK "Sawk" IDS_LENGTH_SEN "Sen" IDS_LENGTH_SHAKU "Shaku" - IDS_LENGTH_FATHOMS "Siahy" - IDS_LENGTH_FATHOMS_HUNGARY "Siahy (Maïarsko)" IDS_LENGTH_SPAN "Span" - IDS_LENGTH_FEET "Stopy" IDS_LENGTH_SUN "Sun" - IDS_LENGTH_LIGHT_YEARS "Svetelné roky" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" IDS_LENGTH_YARDS "Yardy" @@ -616,8 +616,8 @@ BEGIN IDS_POWER_BTUS_PER_MINUTE "Britské termálne jednotky za minútu" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za minútu" + IDS_POWER_HORSEPOWER "Koòské sily" IDS_POWER_KILOWATTS "Kilowatty" - IDS_POWER_HORSEPOWER "Koòské sily" IDS_POWER_MEGAWATTS "Megawatty" IDS_POWER_WATTS "Watty" END @@ -629,9 +629,9 @@ IDS_PRESSURE_BARS "Bary" IDS_PRESSURE_HECTOPASCALS "Hektopascals" IDS_PRESSURE_KILOPASCALS "Kilopascals" - IDS_PRESSURE_PSI "Libry na tvorcový palec" IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury" IDS_PRESSURE_PASCALS "Pascals" + IDS_PRESSURE_PSI "Libry na tvorcový palec" END // TYPES OF TEMPERATURES @@ -651,8 +651,8 @@ IDS_TIME_MICROSECONDS "Mikrosekundy" IDS_TIME_MILLISECONDS "Milisekundy" IDS_TIME_MINUTES "Minúty" + IDS_TIME_SECONDS "Sekundy" IDS_TIME_YEARS "Roky" - IDS_TIME_SECONDS "Sekundy" IDS_TIME_WEEKS "Týdne" END @@ -660,13 +660,13 @@ STRINGTABLE DISCARDABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetre/hodinu" + IDS_VELOCITY_FEET_HOUR "Stopy/hodinu" + IDS_VELOCITY_FEET_SECOND "Stopy/sekundu" IDS_VELOCITY_KILOMETERS_HOUR "Kilometre/hodinu" IDS_VELOCITY_KNOTS "Knots" IDS_VELOCITY_MACH "Mach" IDS_VELOCITY_METERS_SECOND "Metre/sekundu" IDS_VELOCITY_MILES_HOUR "Míle/hodinu" - IDS_VELOCITY_FEET_HOUR "Stopy/hodinu" - IDS_VELOCITY_FEET_SECOND "Stopy/sekundu" END // TYPES OF VOLUMES @@ -677,6 +677,11 @@ IDS_VOLUME_BUN "Bun" IDS_VOLUME_BUSHELS_UK "Buely (UK)" //Buel, Bule? Buly? IDS_VOLUME_BUSHELS_US "Buely (USA)" + IDS_VOLUME_CUBIC_CENTIMETERS "Kubické centimetre" + IDS_VOLUME_CUBIC_FEET "Kubické stopy" + IDS_VOLUME_CUBIC_INCHES "Kubické palce" + IDS_VOLUME_CUBIC_METERS "Kubické metre" + IDS_VOLUME_CUBIC_YARDS "Kubické yardy" IDS_VOLUME_DOE "Doe" IDS_VOLUME_FLUID_OUNCES_UK "Fluid ounces (UK)" IDS_VOLUME_FLUID_OUNCES_US "Fluid ounces (USA)" @@ -686,11 +691,6 @@ IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" - IDS_VOLUME_CUBIC_CENTIMETERS "Kubické centimetre" - IDS_VOLUME_CUBIC_FEET "Kubické stopy" - IDS_VOLUME_CUBIC_INCHES "Kubické palce" - IDS_VOLUME_CUBIC_METERS "Kubické metre" - IDS_VOLUME_CUBIC_YARDS "Kubické yardy" IDS_VOLUME_KWIAN "Kwian" IDS_VOLUME_LITERS "Litre" IDS_VOLUME_MAL "Mal" @@ -712,7 +712,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_QUINTAL_METRIC "Cent (metrický)" + IDS_WEIGHT_CARATS "Karáty" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" @@ -722,19 +722,19 @@ IDS_WEIGHT_JIN_CHINA "Jin (Èína)" IDS_WEIGHT_JIN_TAIWAN "Jin (Tchajvan)" IDS_WEIGHT_KAN "Kan" - IDS_WEIGHT_CARATS "Karáty" IDS_WEIGHT_KILOGRAMS "Kilogramy" IDS_WEIGHT_KIN "Kin" IDS_WEIGHT_LIANG_CHINA "Liang (Èína)" IDS_WEIGHT_LIANG_TAIWAN "Liang (Tchajvan)" + IDS_WEIGHT_MONME "Monme" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce, anglosaská" + IDS_WEIGHT_OUNCES_TROY "Unce, trójska" IDS_WEIGHT_POUNDS "Libry" - IDS_WEIGHT_MONME "Monme" + IDS_WEIGHT_QUINTAL_METRIC "Cent (metrický)" IDS_WEIGHT_SALOUNG "Saloung" IDS_WEIGHT_STONES "Stones" IDS_WEIGHT_TAMLUNG "Tamlung" IDS_WEIGHT_TONNES "Tony" IDS_WEIGHT_TONS_UK "Tony (UK)" IDS_WEIGHT_TONS_US "Tony (USA)" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce, anglosaská" - IDS_WEIGHT_OUNCES_TROY "Unce, trójska" -END +END Added: trunk/reactos/base/applications/paint/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/ja-JP.rc (added) +++ trunk/reactos/base/applications/paint/lang/ja-JP.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -1,0 +1,201 @@ +/* + * Japanese Language resource file + * Translated by: pcds90net, Tomoya Kitagawa + */ + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +ID_MENU MENU +BEGIN + POPUP "t@C(&F)" + BEGIN + MENUITEM "VK(&N)\tCtrl+N", IDM_FILENEW + MENUITEM "J(&O)\tCtrl+O", IDM_FILEOPEN + MENUITEM "ã«Û¶(&S)\tCtrl+S", IDM_FILESAVE + MENUITEM "¼Oðt¯ÄÛ¶(&A)...", IDM_FILESAVEAS + MENUITEM SEPARATOR + MENUITEM "wiÉÝè (À×Ä\\¦)", IDM_FILEASWALLPAPERPLANE + MENUITEM "wiÉÝè (É\\¦)", IDM_FILEASWALLPAPERCENTERED + MENUITEM "wiÉÝè (gå)", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM SEPARATOR + MENUITEM "yCgÌI¹(&Q)\tAlt+F4", IDM_FILEEXIT + END + + POPUP "ÒW(&E)" + BEGIN + MENUITEM "³Éß·\tCtrl+Z", IDM_EDITUNDO + MENUITEM "âè¼µ\tCtrl+Y", IDM_EDITREDO + MENUITEM SEPARATOR + MENUITEM "Øèæè\tCtrl+X", IDM_EDITCUT + MENUITEM "Rs[\tCtrl+C", IDM_EDITCOPY + MENUITEM "\\èt¯\tCtrl+V", IDM_EDITPASTE + MENUITEM "IðÍÍÌí\tDel", IDM_EDITDELETESELECTION + MENUITEM "IðÍÍÌ}ü", IDM_EDITINVERTSELECTION + MENUITEM "·×ÄIð\tCtrl+A", IDM_EDITSELECTALL + MENUITEM SEPARATOR + MENUITEM "t@CÖRs[", IDM_EDITCOPYTO + MENUITEM "t@C©ç\\èt¯", IDM_EDITPASTEFROM + END + + POPUP "\\¦(&V)" + BEGIN + MENUITEM "c[ {bNX\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "J[ pbg\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "Xe[^X o[", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "eLXg c[ o[", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM SEPARATOR + POPUP "gå" + BEGIN + POPUP "[U[è`" + BEGIN + MENUITEM "12,5%", IDM_VIEWZOOM125 + MENUITEM "25%", IDM_VIEWZOOM25 + MENUITEM "50%", IDM_VIEWZOOM50 + MENUITEM "100%", IDM_VIEWZOOM100 + MENUITEM "200%", IDM_VIEWZOOM200 + MENUITEM "400%", IDM_VIEWZOOM400 + MENUITEM "800%", IDM_VIEWZOOM800 + END + MENUITEM SEPARATOR + MENUITEM "Obhð\\¦\tCtrl+G", IDM_VIEWSHOWGRID + MENUITEM "À¡\\¦", IDM_VIEWSHOWMINIATURE + END + MENUITEM "SæÊ\\¦\tCtrl+F", IDM_VIEWFULLSCREEN + END + + POPUP "æ(&I)" + BEGIN + MENUITEM "ñ]ƽ]\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "TCYÌÏX\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Øèæè", IDM_IMAGECROP + MENUITEM "F̽]\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "æÌ®«\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "æÌí\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE + MENUITEM "s§¾Fð`æ·é", IDM_IMAGEDRAWOPAQUE + END + + POPUP "F(&C)" + BEGIN + MENUITEM "pbgÌÒW", IDM_COLORSEDITPALETTE + END + + POPUP "&?" + BEGIN + MENUITEM "wv gsbN", IDM_HELPHELPTOPICS + MENUITEM SEPARATOR + MENUITEM "îñ", IDM_HELPINFO + END +END + +ID_ACCELERATORS ACCELERATORS +BEGIN + "^N", IDM_FILENEW + "^O", IDM_FILEOPEN + "^S", IDM_FILESAVE + "^Z", IDM_EDITUNDO + "^Y", IDM_EDITREDO + "^X", IDM_EDITCUT + "^C", IDM_EDITCOPY + "^V", IDM_EDITPASTE + VK_DELETE, IDM_EDITDELETESELECTION, VIRTKEY + "^A", IDM_EDITSELECTALL + "^T", IDM_VIEWTOOLBOX + "^L", IDM_VIEWCOLORPALETTE + "^G", IDM_VIEWSHOWGRID + "^F", IDM_VIEWFULLSCREEN + "^R", IDM_IMAGEROTATEMIRROR + "^W", IDM_IMAGECHANGESIZE + "^I", IDM_IMAGEINVERTCOLORS + "^E", IDM_IMAGEATTRIBUTES + "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY +END + +IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 9, "MS UI Gothic" +CAPTION "ñ]ƽ]" +BEGIN + GROUPBOX "ñ]ƽ]", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 + AUTORADIOBUTTON " ½ûüɽ]", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "¼ûüɽ]", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "pxðwè", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "90", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "180", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "270", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 + PUSHBUTTON "LZ", IDCANCEL, 125, 24, 48, 14 +END + +IDD_ATTRIBUTES DIALOGEX 100, 100, 210, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 9, "MS UI Gothic" +CAPTION "æÌ®«" +BEGIN + EDITTEXT IDD_ATTRIBUTESEDIT1, 40, 40, 35, 12 + EDITTEXT IDD_ATTRIBUTESEDIT2, 110, 40, 35, 12 + LTEXT ":", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 + LTEXT "³:", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 + LTEXT "t@CÌút:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "t@CÌTCY:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "ðx:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "psÂ\\", IDD_ATTRIBUTESTEXT6, 70, 5, 60, 10 + LTEXT "psÂ\\", IDD_ATTRIBUTESTEXT7, 70, 15, 60, 10 + LTEXT "psÂ\\", IDD_ATTRIBUTESTEXT8, 70, 25, 60, 10 + GROUPBOX "PÊ", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 + AUTORADIOBUTTON "C`", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP + AUTORADIOBUTTON "cm", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 + AUTORADIOBUTTON "sNZ", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 + GROUPBOX "F", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 + AUTORADIOBUTTON "", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "J[", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 + DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 + PUSHBUTTON "LZ", IDCANCEL, 155, 24, 48, 14 + PUSHBUTTON "ftHg", IDD_ATTRIBUTESSTANDARD, 155, 40, 48, 14 +END + +IDD_CHANGESIZE DIALOGEX 100, 100, 210, 80 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 9, "MS UI Gothic" +CAPTION "TCYÌÏX" +BEGIN + GROUPBOX "TCYÌÏX", IDD_CHANGESIZEGROUP, 6, 6, 142, 66 + ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 + LTEXT " ½ûü:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 + EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 + LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 + LTEXT "¼ûü:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 + EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 + LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 + PUSHBUTTON "LZ", IDCANCEL, 155, 24, 48, 14 +END + +STRINGTABLE +BEGIN + IDS_PROGRAMNAME, "yCg" + IDS_WINDOWTITLE, "%s - yCg" + IDS_INFOTITLE, "ReactOS yCg" + IDS_INFOTEXT, "ReactOS yCgÍ GNU Lesser General Public License (LGPL) version 3 (Ú×Í
www.gnu.org)̺ÅpÂ\\Å·B
" + IDS_SAVEPROMPTTEXT, "%s ÌÏXàeðÛ¶µÜ·©?" + IDS_DEFAULTFILENAME, "³è.bmp" + IDS_MINIATURETITLE, "k¬}" + IDS_TOOLTIP1, "©RIð" + IDS_TOOLTIP2, "Ið" + IDS_TOOLTIP3, "ÁµS" + IDS_TOOLTIP4, "hèÂÔµ" + IDS_TOOLTIP5, "FÌIð" + IDS_TOOLTIP6, "gåÆk¬" + IDS_TOOLTIP7, "M" + IDS_TOOLTIP8, "uV" + IDS_TOOLTIP9, "GAuV" + IDS_TOOLTIP10, "eLXg" + IDS_TOOLTIP11, "¼ü" + IDS_TOOLTIP12, "Èü" + IDS_TOOLTIP13, "lp`" + IDS_TOOLTIP14, "½p`" + IDS_TOOLTIP15, "È~" + IDS_TOOLTIP16, "pÛlp`" + IDS_OPENFILTER, "rbg}bv t@C (*.bmp;*.dib)\1*.bmp;*.dib\1·×ÄÌt@C (*.*)\1*.*\1" + IDS_SAVEFILTER, "24 rbg rbg}bv (*.bmp;*.dib)\1*.bmp;*.dib\1" +END Propchange: trunk/reactos/base/applications/paint/lang/ja-JP.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/paint/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/rs…
============================================================================== --- trunk/reactos/base/applications/paint/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/rsrc.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -20,6 +20,7 @@ #include "lang/es-ES.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" +#include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" Added: trunk/reactos/base/applications/rapps/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
============================================================================== --- trunk/reactos/base/applications/rapps/lang/sk-SK.rc (added) +++ trunk/reactos/base/applications/rapps/lang/sk-SK.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -1,0 +1,172 @@ +/* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario (kario(a)szm.sk) + * DATE OF TR.: 29-08-2009 + * LAST CHANGE: 29-08-2009 + */ + +LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT + +IDR_MAINMENU MENU +BEGIN + POPUP "&Súbor" + BEGIN + MENUITEM "&Nastavenia", ID_SETTINGS, GRAYED + MENUITEM SEPARATOR + MENUITEM "S&konèi", ID_EXIT + END + POPUP "&Programy" + BEGIN + MENUITEM "&Intalova", ID_INSTALL + MENUITEM "O&dintalova", ID_UNINSTALL + MENUITEM "&Zmeni", ID_MODIFY + MENUITEM SEPARATOR + MENUITEM "&Obnovi", ID_REFRESH + END + POPUP "Pomocník" + BEGIN + MENUITEM "Pomocník", ID_HELP, GRAYED + MENUITEM "Èo je ...", ID_ABOUT + END +END + +IDR_LINKMENU MENU +BEGIN + POPUP "popup" + BEGIN + MENUITEM "&Otvori linku v prehliadaèi", ID_OPEN_LINK + MENUITEM "&Kopírova linku do schránky", ID_COPY_LINK + END +END + +IDR_APPLICATIONMENU MENU +BEGIN + POPUP "popup" + BEGIN + MENUITEM "&Intalova", ID_INSTALL + MENUITEM "O&dintalova", ID_UNINSTALL + MENUITEM "&Zmeni", ID_MODIFY + MENUITEM SEPARATOR + MENUITEM "&Obnovi", ID_REFRESH + END +END + +IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Nastavenia" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "OK", IDOK, 255, 212, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 320, 212, 60, 14 +END + +IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Stiahnu a naintalova" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "OK", IDOK, 255, 212, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 320, 212, 60, 14 +END + +IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE +CAPTION "Sahujem ..." // Stiahnu ??? +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Progress1", IDC_DOWNLOAD_PROGRESS, "msctls_progress32", WS_BORDER | PBS_SMOOTH, 10, 10, 200, 12 + LTEXT "", IDC_DOWNLOAD_STATUS, 10, 30, 200, 10, SS_CENTER + PUSHBUTTON "Zrui", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP +END + +IDD_ABOUT_DIALOG DIALOGEX 22, 16, 190, 66 +STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +CAPTION "Èo je Manaér aplikácií systému ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Manaér aplikácií systému ReactOS\nAutorské práva (C) 2009\nod Dmitry Chapyshev (dmitry(a)reactos.org)\nPreklad: Mário Kaèmár (kario(a)szm.sk)", IDC_STATIC, 48, 7, 130, 39 + PUSHBUTTON "Zavrie", IDOK, 133, 46, 50, 14 + ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLTIP_INSTALL "Intalova" + IDS_TOOLTIP_UNINSTALL "Odintalova" + IDS_TOOLTIP_MODIFY "Zmeni" + IDS_TOOLTIP_SETTINGS "Nastavenia" + IDS_TOOLTIP_REFRESH "Obnovi" + IDS_TOOLTIP_EXIT "Skonèi" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_NAME "Názov" + IDS_APP_INST_VERSION "Verzia" + IDS_APP_DESCRIPTION "Popis" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_INFO_VERSION "\nVerzia: " + IDS_INFO_DESCRIPTION "\nPopis: " + IDS_INFO_PUBLISHER "\nPublisher: " + IDS_INFO_HELPLINK "\nHelp Link: " + IDS_INFO_HELPPHONE "\nHelp Telephone: " + IDS_INFO_README "\nReadme: " + IDS_INFO_REGOWNER "\nRegistered Owner: " + IDS_INFO_PRODUCTID "\nProductID: " + IDS_INFO_CONTACT "\nKontakt: " + IDS_INFO_UPDATEINFO "\nUpdate Information: " + IDS_INFO_INFOABOUT "\nInformation About: " + IDS_INFO_COMMENTS "\nComments: " + IDS_INFO_INSTLOCATION "\nInstall Location: " + IDS_INFO_INSTALLSRC "\nInstall Source: " + IDS_INFO_UNINSTALLSTR "\nUninstall String: " + IDS_INFO_MODIFYPATH "\nModify Path: " + IDS_INFO_INSTALLDATE "\nInstall Date: " +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_AINFO_VERSION "\nVerzia: " + IDS_AINFO_DESCRIPTION "\nPopis: " + IDS_AINFO_SIZE "\nVe¾kos: " + IDS_AINFO_URLSITE "\nDomovská stránka: " + IDS_AINFO_LICENCE "\nLicencia: " +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_CAT_AUDIO "Audio" + IDS_CAT_DEVEL "Vývojárske" // Development, vývoj?? + IDS_CAT_DRIVERS "Ovládaèe" // Drivers + IDS_CAT_EDU "Vzdelávacie" // Edutainment + IDS_CAT_ENGINEER "Ininierske" // Engineering, kontrukèné?? + IDS_CAT_FINANCE "Finanèné" // Finance, peòaníctvo?? + IDS_CAT_GAMES "Hry & zábava" // Games & Fun, zábavné?? + IDS_CAT_GRAPHICS "Grafické" // Graphics + IDS_CAT_INTERNET "Internet & sie" + IDS_CAT_LIBS "Kninice" + IDS_CAT_OFFICE "Kancelárske" // Office + IDS_CAT_OTHER "Iné" + IDS_CAT_SCIENCE "Vedecké" // Science + IDS_CAT_TOOLS "Nástroje" // Tools + IDS_CAT_VIDEO "Video" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPTITLE "Manaér aplikácií systému ReactOS" + IDS_SEARCH_TEXT "H¾ada..." + IDS_INSTALL "Intalova" + IDS_UNINSTALL "Odintalova" + IDS_MODIFY "Zmeni" + IDS_APPS_COUNT "Poèet programov: %d" + IDS_WELCOME_TITLE "Víta Vás Manaér aplikácií systému ReactOS!\n\n" // ReactOS Application Manager + IDS_WELCOME_TEXT "Vyberte si kategóriu na ¾avej strane, potom vyberte aplikáciu, ktorú chcete naintalova alebo odintalova.\nWebstránka projektu ReactOS: " + IDS_WELCOME_URL "
http://www.reactos.org
" + IDS_INSTALLED "Naintalované" + IDS_AVAILABLEFORINST "Dostupné pre naintalovanie" + IDS_UPDATES "Aktualizácie" + IDS_APPLICATIONS "Aplikácie" + IDS_DOWNLOAD_FOLDER "Sahovania" // Downloads +END Propchange: trunk/reactos/base/applications/rapps/lang/sk-SK.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/rapps/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/rs…
============================================================================== --- trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/rsrc.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -5,4 +5,5 @@ #include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" +#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" Modified: trunk/reactos/dll/cpl/mmsys/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/lang/sk-SK.r…
============================================================================== --- trunk/reactos/dll/cpl/mmsys/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/mmsys/lang/sk-SK.rc [iso-8859-1] Thu Sep 3 17:05:10 2009 @@ -1,6 +1,6 @@ /* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario (kario(a)szm.sk) * DATE OF TR.: 28-04-2008 - * LAST CHANGE: 11-02-2009 + * LAST CHANGE: 26-08-2009 */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT @@ -239,7 +239,7 @@ IDS_CPLNAME "Zvuk a zvukové zariadenia" IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the settings for your speakers and recording devices." IDS_NO_SOUND "(iadne)" - IDS_NO_DEVICES "No Devices" + IDS_NO_DEVICES "iadne zariadenia" 5825 "Chyba programu" 5826 "Zavrie program" @@ -260,7 +260,7 @@ 5841 "Restore Down" 5842 "Restore Up" 5843 "Hviezdièka" - 5844 "Default sound" + 5844 "Predvolený zvuk" //Default sound 5845 "Výkrik" 5846 "Ukonèenie systému ReactOS" 5847 "Kritické zastavenie"
15 years, 3 months
1
0
0
0
[dchapyshev] 42987: - Sync shdocvw with Wine 1.1.29
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Sep 3 16:59:32 2009 New Revision: 42987 URL:
http://svn.reactos.org/svn/reactos?rev=42987&view=rev
Log: - Sync shdocvw with Wine 1.1.29 Modified: trunk/reactos/dll/win32/shdocvw/client.c trunk/reactos/dll/win32/shdocvw/dochost.c trunk/reactos/dll/win32/shdocvw/frame.c trunk/reactos/dll/win32/shdocvw/navigate.c trunk/reactos/dll/win32/shdocvw/oleobject.c trunk/reactos/dll/win32/shdocvw/shdocvw.h trunk/reactos/dll/win32/shdocvw/shdocvw.inf trunk/reactos/dll/win32/shdocvw/webbrowser.c Modified: trunk/reactos/dll/win32/shdocvw/client.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/client.c…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/client.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/client.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -60,6 +60,9 @@ }else if(IsEqualGUID(&IID_IDispatch, riid)) { TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); *ppv = CLDISP(This); + }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { + TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv); + *ppv = PROPNOTIF(This); }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); *ppv = SERVPROV(This); Modified: trunk/reactos/dll/win32/shdocvw/dochost.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/dochost.…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/dochost.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/dochost.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -20,6 +20,7 @@ #include "shdocvw.h" #include "hlink.h" #include "exdispid.h" +#include "mshtml.h" WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); @@ -46,7 +47,7 @@ return 0; } -static void navigate_complete(DocHost *This) +static void notif_complete(DocHost *This, DISPID dispid) { DISPPARAMS dispparams; VARIANTARG params[2]; @@ -66,14 +67,15 @@ V_VT(&url) = VT_BSTR; V_BSTR(&url) = SysAllocString(This->url); - call_sink(This->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams); - call_sink(This->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams); + TRACE("%d >>>\n", dispid); + call_sink(This->cps.wbe2, dispid, &dispparams); + TRACE("%d <<<\n", dispid); SysFreeString(V_BSTR(&url)); This->busy = VARIANT_FALSE; } -void object_available(DocHost *This) +static void object_available(DocHost *This) { IHlinkTarget *hlink; HRESULT hres; @@ -93,14 +95,152 @@ hres = IHlinkTarget_Navigate(hlink, 0, NULL); IHlinkTarget_Release(hlink); + if(FAILED(hres)) + FIXME("Navigate failed\n"); +} + +static HRESULT get_doc_ready_state(DocHost *This, READYSTATE *ret) +{ + DISPPARAMS dp = {NULL,NULL,0,0}; + IDispatch *disp; + EXCEPINFO ei; + VARIANT var; + HRESULT hres; + + hres = IUnknown_QueryInterface(This->document, &IID_IDispatch, (void**)&disp); + if(FAILED(hres)) + return hres; + + hres = IDispatch_Invoke(disp, DISPID_READYSTATE, &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET, + &dp, &var, &ei, NULL); + IDispatch_Release(disp); if(FAILED(hres)) { - FIXME("Navigate failed\n"); + WARN("Invoke(DISPID_READYSTATE failed: %08x\n", hres); + return hres; + } + + if(V_VT(&var) != VT_I4) { + WARN("V_VT(var) = %d\n", V_VT(&var)); + VariantClear(&var); + return E_FAIL; + } + + *ret = V_I4(&var); + return S_OK; +} + +static void advise_prop_notif(DocHost *This, BOOL set) +{ + IConnectionPointContainer *cp_container; + IConnectionPoint *cp; + HRESULT hres; + + hres = IUnknown_QueryInterface(This->document, &IID_IConnectionPointContainer, (void**)&cp_container); + if(FAILED(hres)) return; - } - - navigate_complete(This); - - return; + + hres = IConnectionPointContainer_FindConnectionPoint(cp_container, &IID_IPropertyNotifySink, &cp); + IConnectionPointContainer_Release(cp_container); + if(FAILED(hres)) + return; + + if(set) + hres = IConnectionPoint_Advise(cp, (IUnknown*)PROPNOTIF(This), &This->prop_notif_cookie); + else + hres = IConnectionPoint_Unadvise(cp, This->prop_notif_cookie); + IConnectionPoint_Release(cp); + + if(SUCCEEDED(hres)) + This->is_prop_notif = set; +} + +static void update_ready_state(DocHost *This, READYSTATE ready_state) +{ + if(ready_state > READYSTATE_LOADING && This->ready_state <= READYSTATE_LOADING) { + notif_complete(This, DISPID_NAVIGATECOMPLETE2); + This->ready_state = ready_state; + } + + if(ready_state == READYSTATE_COMPLETE && This->ready_state < READYSTATE_COMPLETE) { + This->ready_state = READYSTATE_COMPLETE; + notif_complete(This, DISPID_DOCUMENTCOMPLETE); + } +} + +typedef struct { + task_header_t header; + IUnknown *doc; + READYSTATE ready_state; +} ready_state_task_t; + +static void ready_state_proc(DocHost *This, task_header_t *_task) +{ + ready_state_task_t *task = (ready_state_task_t*)_task; + + if(task->doc == This->document) + update_ready_state(This, task->ready_state); + + IUnknown_Release(task->doc); +} + +static void push_ready_state_task(DocHost *This, READYSTATE ready_state) +{ + ready_state_task_t *task = heap_alloc(sizeof(ready_state_task_t)); + + IUnknown_AddRef(This->document); + task->doc = This->document; + task->ready_state = ready_state; + + push_dochost_task(This, &task->header, ready_state_proc, FALSE); +} + +static void object_available_proc(DocHost *This, task_header_t *task) +{ + object_available(This); +} + +HRESULT dochost_object_available(DocHost *This, IUnknown *doc) +{ + READYSTATE ready_state; + task_header_t *task; + IOleObject *oleobj; + HRESULT hres; + + IUnknown_AddRef(doc); + This->document = doc; + + hres = IUnknown_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj); + if(SUCCEEDED(hres)) { + CLSID clsid; + + hres = IOleObject_GetUserClassID(oleobj, &clsid); + if(SUCCEEDED(hres)) + TRACE("Got clsid %s\n", + IsEqualGUID(&clsid, &CLSID_HTMLDocument) ? "CLSID_HTMLDocument" : debugstr_guid(&clsid)); + + hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This)); + if(FAILED(hres)) + FIXME("SetClientSite failed: %08x\n", hres); + + IOleObject_Release(oleobj); + }else { + FIXME("Could not get IOleObject iface: %08x\n", hres); + } + + /* FIXME: Call SetAdvise */ + + task = heap_alloc(sizeof(*task)); + push_dochost_task(This, task, object_available_proc, FALSE); + + hres = get_doc_ready_state(This, &ready_state); + if(SUCCEEDED(hres)) { + if(ready_state == READYSTATE_COMPLETE) + push_ready_state_task(This, READYSTATE_COMPLETE); + else + advise_prop_notif(This, TRUE); + } + + return S_OK; } static LRESULT resize_document(DocHost *This, LONG width, LONG height) @@ -173,6 +313,9 @@ IOleObject *oleobj = NULL; IHlinkTarget *hlink = NULL; HRESULT hres; + + if(This->is_prop_notif) + advise_prop_notif(This, FALSE); if(This->view) IOleDocumentView_UIActivate(This->view, FALSE); @@ -502,10 +645,78 @@ DocHostUIHandler_GetOverrideKeyPath }; +#define PROPNOTIF_THIS(iface) DEFINE_THIS(DocHost, IPropertyNotifySink, iface) + +static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, + REFIID riid, void **ppv) +{ + DocHost *This = PROPNOTIF_THIS(iface); + return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv); +} + +static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) +{ + DocHost *This = PROPNOTIF_THIS(iface); + return IOleClientSite_AddRef(CLIENTSITE(This)); +} + +static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) +{ + DocHost *This = PROPNOTIF_THIS(iface); + return IOleClientSite_Release(CLIENTSITE(This)); +} + +static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) +{ + DocHost *This = PROPNOTIF_THIS(iface); + + TRACE("(%p)->(%d)\n", This, dispID); + + switch(dispID) { + case DISPID_READYSTATE: { + READYSTATE ready_state; + HRESULT hres; + + hres = get_doc_ready_state(This, &ready_state); + if(FAILED(hres)) + return hres; + + if(ready_state == READYSTATE_COMPLETE) + advise_prop_notif(This, FALSE); + + push_ready_state_task(This, ready_state); + break; + } + default: + FIXME("unimplemented dispid %d\n", dispID); + return E_NOTIMPL; + } + + return S_OK; +} + +static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) +{ + DocHost *This = PROPNOTIF_THIS(iface); + FIXME("(%p)->(%d)\n", This, dispID); + return E_NOTIMPL; +} + +#undef PROPNOTIF_THIS + +static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { + PropertyNotifySink_QueryInterface, + PropertyNotifySink_AddRef, + PropertyNotifySink_Release, + PropertyNotifySink_OnChanged, + PropertyNotifySink_OnRequestEdit +}; + void DocHost_Init(DocHost *This, IDispatch *disp) { This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl; This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl; + This->lpIPropertyNotifySinkVtbl = &PropertyNotifySinkVtbl; This->disp = disp; @@ -521,6 +732,9 @@ This->silent = VARIANT_FALSE; This->offline = VARIANT_FALSE; + + This->ready_state = READYSTATE_UNINITIALIZED; + This->is_prop_notif = FALSE; DocHost_ClientSite_Init(This); DocHost_Frame_Init(This); Modified: trunk/reactos/dll/win32/shdocvw/frame.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/frame.c?…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/frame.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/frame.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -135,7 +135,7 @@ LPCOLESTR pszStatusText) { DocHost *This = INPLACEFRAME_THIS(iface); - FIXME("(%p)->(%p)\n", This, debugstr_w(pszStatusText)); + FIXME("(%p)->(%s)\n", This, debugstr_w(pszStatusText)); return E_NOTIMPL; } Modified: trunk/reactos/dll/win32/shdocvw/navigate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/navigate…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -22,7 +22,6 @@ #include "wine/debug.h" #include "shdocvw.h" -#include "mshtml.h" #include "exdispid.h" #include "shellapi.h" #include "winreg.h" @@ -220,7 +219,7 @@ FIXME("status code %u\n", ulStatusCode); } - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, @@ -270,49 +269,14 @@ return E_NOTIMPL; } -static void object_available_proc(DocHost *This, task_header_t *task) -{ - object_available(This); -} - static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk) { BindStatusCallback *This = BINDSC_THIS(iface); - task_header_t *task; - IOleObject *oleobj; - HRESULT hres; TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), punk); - IUnknown_AddRef(punk); - This->doc_host->document = punk; - - hres = IUnknown_QueryInterface(punk, &IID_IOleObject, (void**)&oleobj); - if(SUCCEEDED(hres)) { - CLSID clsid; - - hres = IOleObject_GetUserClassID(oleobj, &clsid); - if(SUCCEEDED(hres)) - TRACE("Got clsid %s\n", - IsEqualGUID(&clsid, &CLSID_HTMLDocument) ? "CLSID_HTMLDocument" : debugstr_guid(&clsid)); - - hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This->doc_host)); - if(FAILED(hres)) - FIXME("SetClientSite failed: %08x\n", hres); - - IOleObject_Release(oleobj); - }else { - FIXME("Could not get IOleObject iface: %08x\n", hres); - } - - /* FIXME: Call SetAdvise */ - /* FIXME: Call Invoke(DISPID_READYSTATE) */ - - task = heap_alloc(sizeof(*task)); - push_dochost_task(This->doc_host, task, object_available_proc, FALSE); - - return S_OK; + return dochost_object_available(This->doc_host, punk); } #undef BSC_THIS @@ -357,7 +321,7 @@ { BindStatusCallback *This = HTTPNEG_THIS(iface); - FIXME("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), + TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), dwReserved, pszAdditionalHeaders); if(This->headers) { @@ -374,9 +338,9 @@ LPWSTR *pszAdditionalRequestHeaders) { BindStatusCallback *This = HTTPNEG_THIS(iface); - FIXME("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders), + TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders), debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders); - return E_NOTIMPL; + return S_OK; } #undef HTTPNEG_THIS @@ -511,46 +475,6 @@ exec_info.nShow = SW_SHOW; return ShellExecuteExW(&exec_info); -} - -static HRESULT http_load_hack(DocHost *This, IMoniker *mon, IBindStatusCallback *callback, IBindCtx *bindctx) -{ - IPersistMoniker *persist; - IUnknown *doc; - HRESULT hres; - - /* - * FIXME: - * We should use URLMoniker's BindToObject instead creating HTMLDocument here. - * This should be fixed when mshtml.dll and urlmon.dll will be good enough. - */ - - hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, - CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IUnknown, (void**)&doc); - - if(FAILED(hres)) { - ERR("Could not create HTMLDocument: %08x\n", hres); - return hres; - } - - hres = IUnknown_QueryInterface(doc, &IID_IPersistMoniker, (void**)&persist); - if(FAILED(hres)) { - IUnknown_Release(doc); - return hres; - } - - hres = IPersistMoniker_Load(persist, FALSE, mon, bindctx, 0); - IPersistMoniker_Release(persist); - - if(SUCCEEDED(hres)) - hres = IBindStatusCallback_OnObjectAvailable(callback, &IID_IUnknown, doc); - else - WARN("Load failed: %08x\n", hres); - - IUnknown_Release(doc); - - return IBindStatusCallback_OnStopBinding(callback, hres, NULL); } static HRESULT create_moniker(LPCWSTR url, IMoniker **mon) @@ -585,13 +509,8 @@ static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCtx *bindctx, IBindStatusCallback *callback) { - WCHAR schema[30]; - DWORD schema_len; + IUnknown *unk = NULL; HRESULT hres; - - static const WCHAR httpW[] = {'h','t','t','p',0}; - static const WCHAR httpsW[] = {'h','t','t','p','s',0}; - static const WCHAR ftpW[]= {'f','t','p',0}; if(mon) { IMoniker_AddRef(mon); @@ -609,24 +528,15 @@ IBindCtx_RegisterObjectParam(bindctx, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM, (IUnknown*)CLIENTSITE(This)); - hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, schema, sizeof(schema)/sizeof(schema[0]), - &schema_len, 0); - if(SUCCEEDED(hres) && - (!strcmpW(schema, httpW) || !strcmpW(schema, httpsW) || !strcmpW(schema, ftpW))) { - hres = http_load_hack(This, mon, callback, bindctx); + hres = IMoniker_BindToObject(mon, bindctx, NULL, &IID_IUnknown, (void**)&unk); + if(SUCCEEDED(hres)) { + hres = S_OK; + if(unk) + IUnknown_Release(unk); + }else if(try_application_url(url)) { + hres = S_OK; }else { - IUnknown *unk = NULL; - - hres = IMoniker_BindToObject(mon, bindctx, NULL, &IID_IUnknown, (void**)&unk); - if(SUCCEEDED(hres)) { - hres = S_OK; - if(unk) - IUnknown_Release(unk); - }else if(try_application_url(url)) { - hres = S_OK; - }else { - FIXME("BindToObject failed: %08x\n", hres); - } + FIXME("BindToObject failed: %08x\n", hres); } IMoniker_Release(mon); @@ -638,6 +548,8 @@ IBindCtx *bindctx; VARIANT_BOOL cancel = VARIANT_FALSE; HRESULT hres; + + This->ready_state = READYSTATE_LOADING; on_before_navigate2(This, bsc->url, bsc->post_data, bsc->post_data_len, bsc->headers, &cancel); if(cancel) { Modified: trunk/reactos/dll/win32/shdocvw/oleobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/oleobjec…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/oleobject.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/oleobject.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -152,8 +152,16 @@ SWP_NOZORDER | SWP_SHOWWINDOW); if(This->client) { + IOleContainer *container; + IOleClientSite_ShowObject(This->client); - IOleClientSite_GetContainer(This->client, &This->container); + + hres = IOleClientSite_GetContainer(This->client, &container); + if(SUCCEEDED(hres)) { + if(This->container) + IOleContainer_Release(This->container); + This->container = container; + } } if(This->doc_host.frame) @@ -615,7 +623,13 @@ { WebBrowser *This = INPLACEOBJ_THIS(iface); FIXME("(%p)\n", This); - return E_NOTIMPL; + + if(This->inplace) { + IOleInPlaceSite_Release(This->inplace); + This->inplace = NULL; + } + + return S_OK; } static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface) Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -78,6 +78,7 @@ const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl; const IOleCommandTargetVtbl *lpOleCommandTargetVtbl; const IDispatchVtbl *lpDispatchVtbl; + const IPropertyNotifySinkVtbl *lpIPropertyNotifySinkVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl; /* Interfaces of InPlaceFrame object */ @@ -100,6 +101,10 @@ VARIANT_BOOL silent; VARIANT_BOOL offline; VARIANT_BOOL busy; + + READYSTATE ready_state; + DWORD prop_notif_cookie; + BOOL is_prop_notif; ConnectionPointContainer cps; }; @@ -184,6 +189,7 @@ #define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl) #define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl) #define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl) +#define PROPNOTIF(x) ((IPropertyNotifySink*) &(x)->lpIPropertyNotifySinkVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl) @@ -211,7 +217,7 @@ void create_doc_view_hwnd(DocHost*); void deactivate_document(DocHost*); -void object_available(DocHost*); +HRESULT dochost_object_available(DocHost*,IUnknown*); void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*); HRESULT go_home(DocHost*); Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -142,6 +142,7 @@ [Settings.Reg] HKCU,"Software\Microsoft\Internet Explorer\Main","Start Page",2,"
http://www.winehq.org
" HKCU,"Software\Microsoft\Internet Explorer\Main","Search Page",2,"
http://www.google.com
" +HKCU,"Software\Microsoft\Internet Explorer\Settings","Text Color",2,"0,0,0" HKLM,"Software\Microsoft\Internet Explorer\Main","Default_Page_URL",2,"
http://www.winehq.org
" HKLM,"Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe",,,"%16422%\Internet Explorer\iexplore.exe" HKLM,"Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe","Path",,"%16422%\Internet Explorer;" Modified: trunk/reactos/dll/win32/shdocvw/webbrowser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/webbrows…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] Thu Sep 3 16:59:32 2009 @@ -724,6 +724,7 @@ VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers) { WebBrowser *This = WEBBROWSER_THIS(iface); + LPCWSTR url; TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers); @@ -733,12 +734,20 @@ if(!URL) return S_OK; - if(V_VT(URL) != VT_BSTR) { + switch (V_VT(URL)) + { + case VT_BSTR: + url = V_BSTR(URL); + break; + case VT_BSTR|VT_BYREF: + url = *V_BSTRREF(URL); + break; + default: FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL)); return E_INVALIDARG; } - return navigate_url(&This->doc_host, V_BSTR(URL), Flags, TargetFrameName, PostData, Headers); + return navigate_url(&This->doc_host, url, Flags, TargetFrameName, PostData, Headers); } static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf) @@ -767,9 +776,10 @@ static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState) { WebBrowser *This = WEBBROWSER_THIS(iface); - FIXME("(%p)->(%p)\n", This, lpReadyState); - - *lpReadyState = READYSTATE_COMPLETE; + + TRACE("(%p)->(%p)\n", This, lpReadyState); + + *lpReadyState = This->doc_host.ready_state; return S_OK; }
15 years, 3 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
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
Results per page:
10
25
50
100
200