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
June 2008
----- 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
23 participants
435 discussions
Start a n
N
ew thread
[dchapyshev] 33837: - Implement EnumSystemLanguageGroupsA/W - Implement EnumSystemLocalesA - Reimplement EnumSystemLocalesW
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Jun 3 08:20:41 2008 New Revision: 33837 URL:
http://svn.reactos.org/svn/reactos?rev=33837&view=rev
Log: - Implement EnumSystemLanguageGroupsA/W - Implement EnumSystemLocalesA - Reimplement EnumSystemLocalesW Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Jun 3 08:20:41 2008 @@ -53,6 +53,13 @@ 'C','o','n','t','r','o','l','\\','N','l','s','\\','L','o','c','a','l','e',0 }; +static const WCHAR szLangGroupsKeyName[] = { + 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\','N','l','s','\\', + 'L','a','n','g','u','a','g','e',' ','G','r','o','u','p','s',0 +}; + /****************************************************************************** * @implemented * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.42 @@ -326,6 +333,47 @@ return FALSE; } +static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize) +{ + LANGID langId; + LPCWSTR szResourceName = MAKEINTRESOURCEW(((lgrpid + 0x2000) >> 4) + 1); + HRSRC hResource; + BOOL bRet = FALSE; + + /* FIXME: Is it correct to use the system default langid? */ + langId = GetSystemDefaultLangID(); + + if (SUBLANGID(langId) == SUBLANG_NEUTRAL) + langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT ); + + hResource = FindResourceExW( hCurrentModule, (LPWSTR)RT_STRING, szResourceName, langId ); + + if (hResource) + { + HGLOBAL hResDir = LoadResource( hCurrentModule, hResource ); + + if (hResDir) + { + ULONG iResourceIndex = lgrpid & 0xf; + LPCWSTR lpResEntry = LockResource( hResDir ); + ULONG i; + + for (i = 0; i < iResourceIndex; i++) + lpResEntry += *lpResEntry + 1; + + if (*lpResEntry < nameSize) + { + memcpy( szName, lpResEntry + 1, *lpResEntry * sizeof(WCHAR) ); + szName[*lpResEntry] = '\0'; + bRet = TRUE; + } + + } + FreeResource( hResource ); + } + return bRet; +} + /* Callback function ptrs for EnumLanguageGrouplocalesA/W */ typedef struct @@ -364,7 +412,10 @@ hKey = NLS_RegOpenKey( 0, szLocaleKeyName ); if (!hKey) - DPRINT("NLS registry key not found. Please apply the default registry file 'wine.inf'\n"); + { + DPRINT1("NLS_RegOpenKey() failed\n"); + return FALSE; + } while (bContinue) { @@ -661,8 +712,108 @@ } -/* - * @unimplemented +/* Callback function ptrs for EnumSystemLanguageGroupsA/W */ +typedef struct +{ + LANGUAGEGROUP_ENUMPROCA procA; + LANGUAGEGROUP_ENUMPROCW procW; + DWORD dwFlags; + LONG_PTR lParam; +} ENUMLANGUAGEGROUP_CALLBACKS; + + +/* Internal implementation of EnumSystemLanguageGroupsA/W */ +static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs) +{ + WCHAR szNumber[10], szValue[4]; + HANDLE hKey; + BOOL bContinue = TRUE; + ULONG ulIndex = 0; + + if (!lpProcs) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + switch (lpProcs->dwFlags) + { + case 0: + /* Default to LGRPID_INSTALLED */ + lpProcs->dwFlags = LGRPID_INSTALLED; + /* Fall through... */ + case LGRPID_INSTALLED: + case LGRPID_SUPPORTED: + break; + default: + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + hKey = NLS_RegOpenKey( 0, szLangGroupsKeyName ); + + if (!hKey) + { + DPRINT1("NLS_RegOpenKey() failed\n"); + return FALSE; + } + + while (bContinue) + { + if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), + szValue, sizeof(szValue) )) + { + BOOL bInstalled = szValue[0] == '1' ? TRUE : FALSE; + LGRPID lgrpid = wcstoul( szNumber, NULL, 16 ); + + DPRINT("grpid %s (%sinstalled)\n", szNumber, + bInstalled ? "" : "not "); + + if (lpProcs->dwFlags == LGRPID_SUPPORTED || bInstalled) + { + WCHAR szGrpName[48]; + + if (!NLS_GetLanguageGroupName( lgrpid, szGrpName, sizeof(szGrpName) / sizeof(WCHAR) )) + szGrpName[0] = '\0'; + + if (lpProcs->procW) + bContinue = lpProcs->procW( lgrpid, szNumber, szGrpName, lpProcs->dwFlags, + lpProcs->lParam ); + else + { + char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; + char szGrpNameA[48]; + + /* FIXME: MSDN doesn't say which code page the W->A translation uses, + * or whether the language names are ever localised. Assume CP_ACP. + */ + + WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); + WideCharToMultiByte(CP_ACP, 0, szGrpName, -1, szGrpNameA, sizeof(szGrpNameA), 0, 0); + + bContinue = lpProcs->procA( lgrpid, szNumberA, szGrpNameA, lpProcs->dwFlags, + lpProcs->lParam ); + } + } + + ulIndex++; + } + else + bContinue = FALSE; + + if (!bContinue) + break; + } + + if (hKey) + NtClose( hKey ); + + return TRUE; +} + + +/* + * @implemented */ BOOL STDCALL @@ -671,27 +822,21 @@ DWORD dwFlags, LONG_PTR lParam) { + ENUMLANGUAGEGROUP_CALLBACKS procs; + DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); - if ((!dwFlags & LGRPID_INSTALLED)&&(!dwFlags & LGRPID_SUPPORTED)) - { - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - if (!pLangGroupEnumProc) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - - -/* - * @unimplemented + procs.procA = pLangGroupEnumProc; + procs.procW = NULL; + procs.dwFlags = dwFlags; + procs.lParam = lParam; + + return NLS_EnumSystemLanguageGroups( pLangGroupEnumProc ? &procs : NULL); +} + + +/* + * @implemented */ BOOL STDCALL @@ -700,27 +845,99 @@ DWORD dwFlags, LONG_PTR lParam) { + ENUMLANGUAGEGROUP_CALLBACKS procs; + DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); - if ((!dwFlags & LGRPID_INSTALLED)&&(!dwFlags & LGRPID_SUPPORTED)) - { - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - if (!pLangGroupEnumProc) + procs.procA = NULL; + procs.procW = pLangGroupEnumProc; + procs.dwFlags = dwFlags; + procs.lParam = lParam; + + return NLS_EnumSystemLanguageGroups( pLangGroupEnumProc ? &procs : NULL); +} + + +/* Callback function ptrs for EnumSystemLocalesA/W */ +typedef struct +{ + LOCALE_ENUMPROCA procA; + LOCALE_ENUMPROCW procW; + DWORD dwFlags; +} ENUMSYSTEMLOCALES_CALLBACKS; + + +/* Internal implementation of EnumSystemLocalesA/W */ +static BOOL NLS_EnumSystemLocales(ENUMSYSTEMLOCALES_CALLBACKS *lpProcs) +{ + WCHAR szNumber[10], szValue[4]; + HANDLE hKey; + BOOL bContinue = TRUE; + ULONG ulIndex = 0; + + if (!lpProcs) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - - -/* - * @unimplemented + switch (lpProcs->dwFlags) + { + case LCID_INSTALLED: + case LCID_SUPPORTED: + case LCID_ALTERNATE_SORTS: + break; + default: + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Locale"); + + if (!hKey) + { + DPRINT1("NLS_RegOpenKey() failed\n"); + return FALSE; + } + + while (bContinue) + { + if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), + szValue, sizeof(szValue))) + { + if ((lpProcs->dwFlags == LCID_SUPPORTED)|| + ((lpProcs->dwFlags == LCID_INSTALLED)&&(wcslen(szValue) > 0))) + { + if (lpProcs->procW) + { + bContinue = lpProcs->procW(szNumber); + } + else + { + char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; + + WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); + bContinue = lpProcs->procA(szNumberA); + } + } + + ulIndex++; + } + else + bContinue = FALSE; + + if (!bContinue) + break; + } + + if (hKey) + NtClose(hKey); + + return TRUE; +} + +/* + * @implemented */ BOOL STDCALL @@ -729,8 +946,15 @@ DWORD dwFlags ) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + ENUMSYSTEMLOCALES_CALLBACKS procs; + + DPRINT("(%p,0x%08X)\n", lpLocaleEnumProc, dwFlags); + + procs.procA = lpLocaleEnumProc; + procs.procW = NULL; + procs.dwFlags = dwFlags; + + return NLS_EnumSystemLocales(lpLocaleEnumProc ? &procs : NULL); } @@ -744,89 +968,15 @@ DWORD dwFlags ) { - NTSTATUS result; - HANDLE langKey; - UNICODE_STRING langKeyName = RTL_CONSTANT_STRING( - L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Locale"); - OBJECT_ATTRIBUTES objectAttributes; - ULONG index, length; - unsigned char fullInfo[sizeof(KEY_VALUE_FULL_INFORMATION)+255*2]; //FIXME: MAX_PATH*2 - PKEY_VALUE_FULL_INFORMATION pFullInfo; - - //TODO: Combine with EnumSystemLocalesA - maybe by having one common part, driven by some - // unicode/non-unicode flag. - - //FIXME: dwFlags is really not used, sorry - - // Check if enum proc is a real one - if (lpLocaleEnumProc == NULL) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - // Open language registry key - //FIXME: Should we use critical section here? - - InitializeObjectAttributes(&objectAttributes, - &langKeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - result = NtOpenKey(&langKey, - KEY_READ, - &objectAttributes); - - if (!NT_SUCCESS(result)) - return result; - - DPRINT("Registry key succesfully opened\n"); - - length = sizeof(KEY_VALUE_FULL_INFORMATION) + 255*2;//MAX_PATH*sizeof(WCHAR); - pFullInfo = (PKEY_VALUE_FULL_INFORMATION)&fullInfo; - RtlZeroMemory(pFullInfo, length); - - index = 0; - - result = NtEnumerateValueKey(langKey, - index, - KeyValueFullInformation, - pFullInfo, - length, - &length); - - DPRINT("First enumerate call result=%x\n", result); - while (result != STATUS_NO_MORE_ENTRIES) - { - int i; - WCHAR lpLocale[9]; - - // TODO: Here we should check, in case dwFlags & LCID_INSTALLED is specified, - // if this locale is really installed - // but for now we skip it - - for (i=0; i<8; i++) - lpLocale[i] = pFullInfo->Name[i]; - - lpLocale[8]=0; - - DPRINT("Locale=%S\n", lpLocale); - - // Call Enum func - if (!lpLocaleEnumProc((LPWSTR)lpLocale)) - break; - - // Zero previous values - RtlZeroMemory(pFullInfo, length); - - index++; - result = NtEnumerateValueKey(langKey, index,KeyValueFullInformation, pFullInfo, length, &length); - } - - NtClose(langKey); - - return STATUS_SUCCESS; + ENUMSYSTEMLOCALES_CALLBACKS procs; + + DPRINT("(%p,0x%08X)\n", lpLocaleEnumProc, dwFlags); + + procs.procA = NULL; + procs.procW = lpLocaleEnumProc; + procs.dwFlags = dwFlags; + + return NLS_EnumSystemLocales(lpLocaleEnumProc ? &procs : NULL); }
16 years, 6 months
1
0
0
0
[dchapyshev] 33836: - Add Language Groups values
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Jun 3 08:17:02 2008 New Revision: 33836 URL:
http://svn.reactos.org/svn/reactos?rev=33836&view=rev
Log: - Add Language Groups values Modified: trunk/reactos/boot/bootdata/hivesys.inf Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Tue Jun 3 08:17:02 2008 @@ -611,6 +611,24 @@ ;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000455",0x00000000,"" HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000456",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","1",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","2",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","3",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","4",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","5",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","6",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","7",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","8",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","9",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","10",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","11",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","a",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","b",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","c",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","d",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","e",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","f",0x00000000,"1" + ; Some installers check for SP6 HKLM,"SYSTEM\CurrentControlSet\Control\Windows","CSDVersion",0x00010001,0x00000600
16 years, 6 months
1
0
0
0
[dchapyshev] 33835: - More implement "Regional Options" dialog - Small fix "Advanced" dialog
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Jun 3 06:55:02 2008 New Revision: 33835 URL:
http://svn.reactos.org/svn/reactos?rev=33835&view=rev
Log: - More implement "Regional Options" dialog - Small fix "Advanced" dialog Modified: trunk/reactos/dll/cpl/intl/advanced.c trunk/reactos/dll/cpl/intl/generalp.c Modified: trunk/reactos/dll/cpl/intl/advanced.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/advanced.c?re…
============================================================================== --- trunk/reactos/dll/cpl/intl/advanced.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/intl/advanced.c [iso-8859-1] Tue Jun 3 06:55:02 2008 @@ -60,13 +60,6 @@ continue; } - /*_stprintf(Section, _T("%s%d"), _T("CODEPAGE_REMOVE_"), uiCPage); - if ((uiCPage == GetACP()) || (uiCPage == GetOEMCP()) || - (!SetupFindFirstLine(hIntlInf, Section, _T("AddReg"), &infCont))) - { - lpCPage->Status |= (0x0001 | 0x0002); - }*/ - lpCPage->NextItem = PCPage; PCPage = lpCPage; } @@ -336,6 +329,8 @@ LCID lcid; INT iIndex; + PropSheet_UnChanged(GetParent(hwndDlg), hwndDlg); + iIndex = SendMessage(hLangList, CB_GETCURSEL, 0, 0); if (iIndex == CB_ERR) break; @@ -345,7 +340,6 @@ break; SetNonUnicodeLang(hwndDlg, lcid); - PropSheet_UnChanged(GetParent(hwndDlg), hwndDlg); } } break; Modified: trunk/reactos/dll/cpl/intl/generalp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/generalp.c?re…
============================================================================== --- trunk/reactos/dll/cpl/intl/generalp.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/intl/generalp.c [iso-8859-1] Tue Jun 3 06:55:02 2008 @@ -235,7 +235,6 @@ } /* Location enumerate procedure */ -#if 0 BOOL CALLBACK LocationsEnumProc(GEOID gId) @@ -256,14 +255,12 @@ return TRUE; } -#endif /* Enumerate all system locations identifiers */ static VOID CreateLocationsList(HWND hWnd) { -#if 0 GEOID userGeoID; TCHAR loc[MAX_STR_SIZE]; @@ -283,7 +280,6 @@ CB_SELECTSTRING, (WPARAM) -1, (LPARAM)loc); -#endif } DWORD @@ -370,6 +366,12 @@ } break; + case IDC_LOCATION_COMBO: + if (HIWORD(wParam) == CBN_SELCHANGE) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; case IDC_SETUP_BUTTON: { LCID NewLcid; @@ -403,7 +405,10 @@ { /* Apply changes */ LCID NewLcid; + GEOID NewGeoID; INT iCurSel; + + PropSheet_UnChanged(GetParent(hwndDlg), hwndDlg); /* Acquire new value */ iCurSel = SendMessage(hList, @@ -420,8 +425,23 @@ if (NewLcid == (LCID)CB_ERR) break; + iCurSel = SendMessage(GetDlgItem(hwndDlg, IDC_LOCATION_COMBO), + CB_GETCURSEL, + 0, + 0); + if (iCurSel == CB_ERR) + break; + + NewGeoID = SendMessage(GetDlgItem(hwndDlg, IDC_LOCATION_COMBO), + CB_GETITEMDATA, + iCurSel, + 0); + if (NewGeoID == (GEOID)CB_ERR) + break; + /* Set new locale */ SetNewLocale(NewLcid); + SetUserGeoID(NewGeoID); SetNonUnicodeLang(hwndDlg, NewLcid); } }
16 years, 6 months
1
0
0
0
[dchapyshev] 33834: - Implement EnumSystemGeoID - Implement GetGeoInfoA/W (partially) - Small fix EnumSystemCodePagesA/W
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Jun 3 06:51:21 2008 New Revision: 33834 URL:
http://svn.reactos.org/svn/reactos?rev=33834&view=rev
Log: - Implement EnumSystemGeoID - Implement GetGeoInfoA/W (partially) - Small fix EnumSystemCodePagesA/W Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Jun 3 06:51:21 2008 @@ -45,7 +45,9 @@ LONG_PTR param; } ENUM_UILANG_CALLBACK; -static const WCHAR szLocaleKeyName[] = { +static const WCHAR szLocaleKeyName[] = + +{ 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\','N','l','s','\\','L','o','c','a','l','e',0 @@ -278,6 +280,50 @@ hkey = 0; return hkey; +} + +static BOOL NLS_RegEnumSubKey(HANDLE hKey, UINT ulIndex, LPWSTR szKeyName, + ULONG keyNameSize) +{ + BYTE buffer[80]; + KEY_BASIC_INFORMATION *info = (KEY_BASIC_INFORMATION *)buffer; + DWORD dwLen; + + if (NtEnumerateKey( hKey, ulIndex, KeyBasicInformation, buffer, + sizeof(buffer), &dwLen) != STATUS_SUCCESS || + info->NameLength > keyNameSize) + { + return FALSE; + } + + DPRINT("info->Name %s info->NameLength %d\n", info->Name, info->NameLength); + + memcpy( szKeyName, info->Name, info->NameLength); + szKeyName[info->NameLength / sizeof(WCHAR)] = '\0'; + + DPRINT("returning %s\n", szKeyName); + return TRUE; +} + +static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal) +{ + BYTE buffer[128]; + const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; + DWORD dwSize = sizeof(buffer); + UNICODE_STRING valueName; + + RtlInitUnicodeString( &valueName, szValueName ); + + DPRINT("%p, %s\n", hKey, szValueName); + if (NtQueryValueKey( hKey, &valueName, KeyValuePartialInformation, + buffer, dwSize, &dwSize ) == STATUS_SUCCESS && + info->DataLength == sizeof(DWORD)) + { + memcpy(lpVal, info->Data, sizeof(DWORD)); + return TRUE; + } + + return FALSE; } @@ -471,8 +517,8 @@ if (NLS_RegEnumValue(hKey, ulIndex, szNumber, sizeof(szNumber), szValue, sizeof(szValue))) { - if (((dwFlags & CP_SUPPORTED)&&(wcslen(szValue) < 1))|| - ((dwFlags & CP_INSTALLED)&&(wcslen(szValue) > 1))) + if ((dwFlags & CP_SUPPORTED)|| + ((dwFlags & CP_INSTALLED)&&(wcslen(szValue) > 2))) if (!lpCodePageEnumProc(szNumber)) break; @@ -523,7 +569,7 @@ hKey = NLS_RegOpenKey(0, L"\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage"); if (!hKey) { - DPRINT("NLS_RegOpenKey() failed\n"); + DPRINT1("NLS_RegOpenKey() failed\n"); return FALSE; } @@ -536,7 +582,7 @@ WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); - if (((dwFlags & CP_SUPPORTED)&&(wcslen(szValue) < 1))|| + if ((dwFlags & CP_SUPPORTED)|| ((dwFlags & CP_INSTALLED)&&(wcslen(szValue) > 1))) if (!lpCodePageEnumProc(szNumberA)) break; @@ -557,39 +603,61 @@ /* - * @unimplemented + * @implemented */ BOOL STDCALL EnumSystemGeoID( GEOCLASS GeoClass, - GEOID ParentGeoId, + GEOID ParentGeoId, // reserved GEO_ENUMPROC lpGeoEnumProc) { - if(!lpGeoEnumProc) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - switch(GeoClass) - { - case GEOCLASS_NATION: - /*RtlEnterCriticalSection(&DllLock); - - FIXME - Get GEO IDs calling Csr - - RtlLeaveCriticalSection(&DllLock);*/ - - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - break; - - default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - return FALSE; + WCHAR szNumber[5 + 1]; + ULONG ulIndex = 0; + HANDLE hKey; + + DPRINT("(0x%08X,0x%08X,%p)\n", GeoClass, ParentGeoId, lpGeoEnumProc); + + if(!lpGeoEnumProc || GeoClass != GEOCLASS_NATION) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List"); + if (!hKey) + { + DPRINT1("NLS_RegOpenKey() failed\n"); + return FALSE; + } + + while (NLS_RegEnumSubKey(hKey, ulIndex, szNumber, sizeof(szNumber))) + { + BOOL bContinue = TRUE; + DWORD dwGeoId; + HANDLE hSubKey = NLS_RegOpenKey(hKey, szNumber); + + if (hSubKey) + { + if (NLS_RegGetDword(hSubKey, L"CountryCode", &dwGeoId)) + { + if (!lpGeoEnumProc(dwGeoId)) + bContinue = FALSE; + } + + NtClose(hSubKey); + } + + if (!bContinue) + break; + + ulIndex++; + } + + if (hKey) + NtClose(hKey); + + return TRUE; } @@ -603,6 +671,20 @@ DWORD dwFlags, LONG_PTR lParam) { + DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); + + if ((!dwFlags & LGRPID_INSTALLED)&&(!dwFlags & LGRPID_SUPPORTED)) + { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + if (!pLangGroupEnumProc) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -618,6 +700,20 @@ DWORD dwFlags, LONG_PTR lParam) { + DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); + + if ((!dwFlags & LGRPID_INSTALLED)&&(!dwFlags & LGRPID_SUPPORTED)) + { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + if (!pLangGroupEnumProc) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -1056,6 +1152,80 @@ return 0; } +static int +NLS_GetGeoFriendlyName(GEOID Location, LPWSTR szFriendlyName, int cchData) +{ + HANDLE hKey; + WCHAR szPath[MAX_PATH]; + UNICODE_STRING ValueName; + KEY_VALUE_PARTIAL_INFORMATION *info; + static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); + DWORD dwSize; + NTSTATUS Status; + int Ret; + + swprintf(szPath, L"\\Registry\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List\\%d", Location); + + hKey = NLS_RegOpenKey(0, szPath); + if (!hKey) + { + DPRINT1("NLS_RegOpenKey() failed\n"); + return 0; + } + + dwSize = info_size + cchData * sizeof(WCHAR); + + if (!(info = HeapAlloc(GetProcessHeap(), 0, dwSize))) + { + NtClose(hKey); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + + RtlInitUnicodeString(&ValueName, L"Name"); + + Status = NtQueryValueKey(hKey, &ValueName, KeyValuePartialInformation, + (LPBYTE)info, dwSize, &dwSize); + + if (!Status) + { + Ret = (dwSize - info_size) / sizeof(WCHAR); + + if (!Ret || ((WCHAR *)info->Data)[Ret-1]) + { + if (Ret < cchData || !szFriendlyName) Ret++; + else + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + Ret = 0; + } + } + + if (Ret && szFriendlyName) + { + memcpy(szFriendlyName, info->Data, (Ret-1) * sizeof(WCHAR)); + szFriendlyName[Ret-1] = 0; + } + } + else if (Status == STATUS_BUFFER_OVERFLOW && !szFriendlyName) + { + Ret = (dwSize - info_size) / sizeof(WCHAR) + 1; + } + else if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + Ret = -1; + } + else + { + SetLastError(RtlNtStatusToDosError(Status)); + Ret = 0; + } + + NtClose(hKey); + HeapFree(GetProcessHeap(), 0, info); + + return Ret; +} /* * @unimplemented @@ -1065,11 +1235,35 @@ GetGeoInfoW( GEOID Location, GEOTYPE GeoType, - LPWSTR lpGeoData, + LPWSTR lpGeoData, int cchData, LANGID LangId) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + DPRINT1("%d %d %p %d %d\n", Location, GeoType, lpGeoData, cchData, LangId); + + if ((GeoType == GEO_TIMEZONES)||(GeoType == GEO_OFFICIALLANGUAGES)) + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + } + + switch (GeoType) + { + case GEO_FRIENDLYNAME: + { + return NLS_GetGeoFriendlyName(Location, lpGeoData, cchData); + } + case GEO_NATION: + case GEO_LATITUDE: + case GEO_LONGITUDE: + case GEO_ISO2: + case GEO_ISO3: + case GEO_RFC1766: + case GEO_LCID: + case GEO_OFFICIALNAME: + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + break; + } + return 0; } @@ -1082,11 +1276,44 @@ GetGeoInfoA( GEOID Location, GEOTYPE GeoType, - LPSTR lpGeoData, + LPSTR lpGeoData, int cchData, LANGID LangId) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + DPRINT1("%d %d %p %d %d\n", Location, GeoType, lpGeoData, cchData, LangId); + + if ((GeoType == GEO_TIMEZONES)||(GeoType == GEO_OFFICIALLANGUAGES)) + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + } + + switch (GeoType) + { + case GEO_FRIENDLYNAME: + { + WCHAR szBuffer[MAX_PATH]; + int Ret; + + Ret = NLS_GetGeoFriendlyName(Location, szBuffer, cchData); + char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)]; + + WideCharToMultiByte(CP_ACP, 0, szBuffer, -1, szBufferA, sizeof(szBufferA), 0, 0); + strcpy(lpGeoData, szBufferA); + + return Ret; + } + case GEO_NATION: + case GEO_LATITUDE: + case GEO_LONGITUDE: + case GEO_ISO2: + case GEO_ISO3: + case GEO_RFC1766: + case GEO_LCID: + case GEO_OFFICIALNAME: + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + break; + } + return 0; }
16 years, 6 months
1
0
0
0
[dchapyshev] 33833: - Add geographic locations
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Jun 3 06:48:16 2008 New Revision: 33833 URL:
http://svn.reactos.org/svn/reactos?rev=33833&view=rev
Log: - Add geographic locations Modified: trunk/reactos/boot/bootdata/hivedef.inf trunk/reactos/boot/bootdata/hivesft.inf Modified: trunk/reactos/boot/bootdata/hivedef.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] Tue Jun 3 06:48:16 2008 @@ -23,6 +23,7 @@ HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,"" HKCU,"Control Panel\International",,0x00000012 HKCU,"Control Panel\International","Locale",0x00000000,"0409" +HKCU,"Control Panel\International\Geo","Nation",0x00000000,"1" ;Cursors Schemes HKCU,"Control Panel\Cursors",,,"ReactOS Default" Modified: trunk/reactos/boot/bootdata/hivesft.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] Tue Jun 3 06:48:16 2008 @@ -785,6 +785,168 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","7",0x00000000,"
time.windows.com
" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","8",0x00000000,"
time.nist.gov
" +; Country Codes +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List",,0x00000012 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List","CountryListVersion",0x00010001,0x00000019 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","CountryCode",0x00010001,0x00000001 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","Name",0x00000000,"United States of America" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","CountryCode",0x00010001,0x00000001 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","Name",0x00000000,"British Virgin Islands" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","CountryCode",0x00010001,0x00000001 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","Name",0x00000000,"Canada" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","CountryCode",0x00010001,0x00000001 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","Name",0x00000000,"Dominica" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","CountryCode",0x00010001,0x00000001 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","Name",0x00000000,"Dominican Republic" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","CountryCode",0x00010001,0x00000014 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","Name",0x00000000,"Egypt" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","CountryCode",0x00010001,0x0000010c +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","Name",0x00000000,"Swaziland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","CountryCode",0x00010001,0x0000001b +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","Name",0x00000000,"South Africa" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","CountryCode",0x00010001,0x0000001e +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","Name",0x00000000,"Greece" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","CountryCode",0x00010001,0x0000001f +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","Name",0x00000000,"Netherlands" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","CountryCode",0x00010001,0x00000020 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","Name",0x00000000,"Belgium" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","CountryCode",0x00010001,0x00000021 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","Name",0x00000000,"France" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","CountryCode",0x00010001,0x00000022 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","Name",0x00000000,"Spain" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","CountryCode",0x00010001,0x0000015f +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","Name",0x00000000,"Portugal" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","CountryCode",0x00010001,0x00000160 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","Name",0x00000000,"Luxembourg" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","CountryCode",0x00010001,0x00000161 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","Name",0x00000000,"Ireland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","CountryCode",0x00010001,0x00000162 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","Name",0x00000000,"Iceland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","CountryCode",0x00010001,0x00000163 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","Name",0x00000000,"Albania" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","CountryCode",0x00010001,0x00000166 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","Name",0x00000000,"Finland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","CountryCode",0x00010001,0x00000167 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","Name",0x00000000,"Bulgaria" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","CountryCode",0x00010001,0x00000024 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","Name",0x00000000,"Hungary" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","CountryCode",0x00010001,0x00000172 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","Name",0x00000000,"Lithuania" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","CountryCode",0x00010001,0x00000173 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","Name",0x00000000,"Latvia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","CountryCode",0x00010001,0x00000174 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","Name",0x00000000,"Estonia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","CountryCode",0x00010001,0x00000175 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","Name",0x00000000,"Moldova" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","CountryCode",0x00010001,0x00000176 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","Name",0x00000000,"Armenia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","CountryCode",0x00010001,0x0000017c +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","Name",0x00000000,"Ukraine" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","CountryCode",0x00010001,0x0000017d +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","Name",0x00000000,"Yugoslavia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","CountryCode",0x00010001,0x00000181 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","Name",0x00000000,"Croatia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","CountryCode",0x00010001,0x00000182 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","Name",0x00000000,"Slovenia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","CountryCode",0x00010001,0x00000183 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","Name",0x00000000,"Bosnia and Herzegovina" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","CountryCode",0x00010001,0x00000027 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","Name",0x00000000,"Italy" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","CountryCode",0x00010001,0x00000028 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","Name",0x00000000,"Romania" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","CountryCode",0x00010001,0x00000029 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","Name",0x00000000,"Switzerland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","CountryCode",0x00010001,0x000001a4 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","Name",0x00000000,"Czech Republic" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","CountryCode",0x00010001,0x000001a5 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","Name",0x00000000,"Slovakia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","CountryCode",0x00010001,0x000001a7 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","Name",0x00000000,"Liechtenstein" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","CountryCode",0x00010001,0x0000002b +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"Austria" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"United Kingdom" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"Sweden" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","Name",0x00000000,"Norway" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","CountryCode",0x00010001,0x00000030 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","Name",0x00000000,"Poland" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","CountryCode",0x00010001,0x00000031 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","Name",0x00000000,"Germany" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","CountryCode",0x00010001,0x00000034 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","Name",0x00000000,"Mexico" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","CountryCode",0x00010001,0x00000036 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","Name",0x00000000,"Argentina" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","CountryCode",0x00010001,0x00000037 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","Name",0x00000000,"Brazil" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","CountryCode",0x00010001,0x00000038 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","Name",0x00000000,"Chile" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","CountryCode",0x00010001,0x00000039 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","Name",0x00000000,"Colombia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","CountryCode",0x00010001,0x0000003a +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","Name",0x00000000,"Venezuela" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","CountryCode",0x00010001,0x0000003c +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","Name",0x00000000,"Malaysia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","CountryCode",0x00010001,0x0000003d +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","Name",0x00000000,"Australia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","CountryCode",0x00010001,0x0000003e +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","Name",0x00000000,"Indonesia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","CountryCode",0x00010001,0x0000003f +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","Name",0x00000000,"Philippines" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","CountryCode",0x00010001,0x00000040 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","Name",0x00000000,"New Zealand" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","CountryCode",0x00010001,0x00000007 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","Name",0x00000000,"Russia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","CountryCode",0x00010001,0x00000007 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","Name",0x00000000,"Kazakhstan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","CountryCode",0x00010001,0x00000007 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","Name",0x00000000,"Tajikistan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","CountryCode",0x00010001,0x00000051 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","Name",0x00000000,"Japan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","CountryCode",0x00010001,0x00000052 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","Name",0x00000000,"Korea (Republic of)" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","CountryCode",0x00010001,0x00000352 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","Name",0x00000000,"Korea (North)" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","CountryCode",0x00010001,0x00000056 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","Name",0x00000000,"China" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","CountryCode",0x00010001,0x00000376 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","Name",0x00000000,"Taiwan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","CountryCode",0x00010001,0x0000005a +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","Name",0x00000000,"Turkey" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","CountryCode",0x00010001,0x0000005b +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","Name",0x00000000,"India" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","CountryCode",0x00010001,0x0000005d +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","Name",0x00000000,"Afghanistan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","CountryCode",0x00010001,0x000003c0 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","Name",0x00000000,"Maldives" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","CountryCode",0x00010001,0x000003c4 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","Name",0x00000000,"Iraq" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","CountryCode",0x00010001,0x000003c6 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","Name",0x00000000,"Saudi Arabia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","CountryCode",0x00010001,0x000003cb +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","Name",0x00000000,"United Arab Emirates" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","CountryCode",0x00010001,0x000003cc +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","Name",0x00000000,"Israel" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","CountryCode",0x00010001,0x000003ce +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","Name",0x00000000,"Qatar" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","CountryCode",0x00010001,0x000003d0 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","Name",0x00000000,"Mongolia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","CountryCode",0x00010001,0x000003d1 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","Name",0x00000000,"Nepal" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","CountryCode",0x00010001,0x00000062 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","Name",0x00000000,"Iran" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","CountryCode",0x00010001,0x000003e1 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","Name",0x00000000,"Turkmenistan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","CountryCode",0x00010001,0x000003e2 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","Name",0x00000000,"Azerbaijan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","CountryCode",0x00010001,0x000003e3 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","Name",0x00000000,"Georgia" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","CountryCode",0x00010001,0x000003e4 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","Name",0x00000000,"Kyrgyzstan" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","CountryCode",0x00010001,0x000003e6 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","Name",0x00000000,"Uzbekistan" + ;Cursors Schemes HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes","ReactOS Default",0x00020000,"\",,,,,,,,,,,,,\""
16 years, 6 months
1
0
0
0
[jimtabor] 33832: Move from fixed PrimarySurface to pointer based pPrimarySurface. Misc changes..
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Jun 2 22:41:54 2008 New Revision: 33832 URL:
http://svn.reactos.org/svn/reactos?rev=33832&view=rev
Log: Move from fixed PrimarySurface to pointer based pPrimarySurface. Misc changes.. Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/palette.h trunk/reactos/subsystems/win32/win32k/objects/bitblt.c trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c trunk/reactos/subsystems/win32/win32k/objects/brush.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/fillshap.c trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -459,10 +459,10 @@ } DestPalette = pDestSurf->hDIBPalette; - if (!DestPalette) DestPalette = PrimarySurface.DevInfo.hpalDefault; + if (!DestPalette) DestPalette = pPrimarySurface->DevInfo.hpalDefault; SourcePalette = pSrcSurf->hDIBPalette; - if (!SourcePalette) SourcePalette = PrimarySurface.DevInfo.hpalDefault; + if (!SourcePalette) SourcePalette = pPrimarySurface->DevInfo.hpalDefault; DPRINT("DestPalette = %p, SourcePalette = %p, DefaultPatelle = %p\n", DestPalette, SourcePalette, NtGdiGetStockObject((INT)DEFAULT_PALETTE)); Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -140,7 +140,7 @@ INT DC_Type; INT DC_Flags; PVOID pPDev; // PGDIDEVICE aka PDEVOBJ - PVOID hSem; // PERESOURCE + PVOID hSem; // PERESOURCE aka HSEMAPHORE FLONG flGraphics; FLONG flGraphics2; PDC_ATTR pDc_Attr; @@ -254,14 +254,6 @@ struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; } GDIDEVICE, *PGDIDEVICE; -/* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs 15/9-2006*/ -typedef struct -{ - LPENHMETAHEADER emh; - BOOL on_disk; /* true if metafile is on disk */ -} DD_ENHMETAFILEOBJ, *PDD_ENHMETAFILEOBJ; - - /* Internal functions *********************************************************/ #define DC_LockDc(hDC) \ @@ -313,6 +305,6 @@ HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC); BOOL FASTCALL IntGdiCleanDC(HDC hDC); -extern GDIDEVICE PrimarySurface; +extern PGDIDEVICE pPrimarySurface; #endif /* not __WIN32K_DC_H */ Modified: trunk/reactos/subsystems/win32/win32k/include/palette.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -82,5 +82,7 @@ INT FASTCALL PALETTE_GetObject(PPALGDI pGdiObject, INT cbCount, LPLOGBRUSH lpBuffer); PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID); +HPALETTE FASTCALL GdiSelectPalette(HDC, HPALETTE, BOOL); + #endif /* not _WIN32K_PALETTE_H */ Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -410,10 +410,10 @@ } DestPalette = BitmapDest->hDIBPalette; - if (!DestPalette) DestPalette = PrimarySurface.DevInfo.hpalDefault; + if (!DestPalette) DestPalette = pPrimarySurface->DevInfo.hpalDefault; SourcePalette = BitmapSrc->hDIBPalette; - if (!SourcePalette) SourcePalette = PrimarySurface.DevInfo.hpalDefault; + if (!SourcePalette) SourcePalette = pPrimarySurface->DevInfo.hpalDefault; if(!(PalSourceGDI = PALETTE_LockPalette(SourcePalette))) { Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -266,7 +266,7 @@ if ( BitmapObject ) { Pal = BitmapObject->hDIBPalette; - if (!Pal) Pal = PrimarySurface.DevInfo.hpalDefault; + if (!Pal) Pal = pPrimarySurface->DevInfo.hpalDefault; /* FIXME: Verify if it shouldn't be PAL_BGR! */ XlateObj = (XLATEOBJ*)IntEngCreateXlate ( PAL_RGB, 0, NULL, Pal ); Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -128,7 +128,7 @@ hPalette = pSurface->hDIBPalette; BITMAPOBJ_UnlockBitmap(pSurface); } - if (!hPalette) hPalette = PrimarySurface.DevInfo.hpalDefault; + if (!hPalette) hPalette = pPrimarySurface->DevInfo.hpalDefault; if (BrushObj->flAttrs & GDIBRUSH_IS_NULL) { Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -29,8 +29,8 @@ // --------------------------------------------------------- File Statics -GDIDEVICE PrimarySurface; -static PGDIDEVICE pPrimarySurface = NULL; +static GDIDEVICE PrimarySurface; +PGDIDEVICE pPrimarySurface = &PrimarySurface; static KEVENT VideoDriverNeedsPreparation; static KEVENT VideoDriverPrepared; static PDC defaultDCstate = NULL; @@ -347,7 +347,7 @@ RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface)); - if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool, sizeof(GDIDEVICE), TAG_GDIPDEV); +// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool, sizeof(GDIDEVICE), TAG_GDIPDEV); PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber); @@ -3394,7 +3394,7 @@ PGDIDEVICE pPDev, pGdiDevice = (PGDIDEVICE) hdev; if (!pGdiDevice) return NULL; if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL; - pPDev = &PrimarySurface; + pPDev = pPrimarySurface; IntGdiAcquireSemaphore(hsemDriverMgmt); do { Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -1552,7 +1552,7 @@ ASSERT(BitmapObj); hDestPalette = BitmapObj->hDIBPalette; - if (!hDestPalette) hDestPalette = PrimarySurface.DevInfo.hpalDefault; + if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault; PalDestGDI = PALETTE_LockPalette(hDestPalette); if (PalDestGDI) Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Mon Jun 2 22:41:54 2008 @@ -1631,7 +1631,7 @@ /* Create the brushes */ hDestPalette = BitmapObj->hDIBPalette; - if (!hDestPalette) hDestPalette = PrimarySurface.DevInfo.hpalDefault; + if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault; PalDestGDI = PALETTE_LockPalette(hDestPalette); if ( !PalDestGDI ) Mode = PAL_RGB;
16 years, 6 months
1
0
0
0
[jimtabor] 33831: Update Dc level structure.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Jun 2 16:10:31 2008 New Revision: 33831 URL:
http://svn.reactos.org/svn/reactos?rev=33831&view=rev
Log: Update Dc level structure. Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Mon Jun 2 16:10:31 2008 @@ -99,7 +99,10 @@ COLORADJUSTMENT ca; FLONG flFontState; UNIVERSAL_FONT_ID ufi; - DWORD unk4_00000000[11]; + UNIVERSAL_FONT_ID ufiLoc[4]; // Local List. + UNIVERSAL_FONT_ID *pUFI; + ULONG uNumUFIs; + BOOL ufiSet; FLONG fl; FLONG flBrush; union{
16 years, 6 months
1
0
0
0
[jimtabor] 33830: Move xform data from W structure into DcLevel within unions. Why: Sticking with systems floating point and reducing the size of DC.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Jun 2 14:51:04 2008 New Revision: 33830 URL:
http://svn.reactos.org/svn/reactos?rev=33830&view=rev
Log: Move xform data from W structure into DcLevel within unions. Why: Sticking with systems floating point and reducing the size of DC. Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/gdifloat.h trunk/reactos/subsystems/win32/win32k/objects/coord.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/dcutil.c trunk/reactos/subsystems/win32/win32k/objects/path.c trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -65,11 +65,6 @@ /* #endif */ BYTE bitsPerPixel; - - XFORM xformWorld2Wnd; /* World-to-window transformation */ - XFORM xformWorld2Vport; /* World-to-viewport transformation */ - XFORM xformVport2World; /* Inverse of the above transformation */ - BOOL vport2WorldValid; /* Is xformVport2World valid? */ } WIN_DC_INFO; // EXtended CLip and Window Region Object @@ -107,9 +102,18 @@ DWORD unk4_00000000[11]; FLONG fl; FLONG flBrush; + union{ MATRIX_S mxWorldToDevice; + XFORM xformWorld2Vport; /* World-to-viewport transformation */ + }; + union{ MATRIX_S mxDeviceToWorld; + XFORM xformVport2World; /* Inverse of the above transformation */ + }; + union{ MATRIX_S mxWorldToPage; + XFORM xformWorld2Wnd; /* World-to-window transformation */ + }; EFLOAT_S efM11PtoD; EFLOAT_S efM22PtoD; EFLOAT_S efDxPtoD; Modified: trunk/reactos/subsystems/win32/win32k/include/gdifloat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -33,12 +33,12 @@ /* Perform the transformation */ x = point->x; y = point->y; - point->x = x * dc->w.xformWorld2Vport.eM11 + - y * dc->w.xformWorld2Vport.eM21 + - dc->w.xformWorld2Vport.eDx; - point->y = x * dc->w.xformWorld2Vport.eM12 + - y * dc->w.xformWorld2Vport.eM22 + - dc->w.xformWorld2Vport.eDy; + point->x = x * dc->DcLevel.xformWorld2Vport.eM11 + + y * dc->DcLevel.xformWorld2Vport.eM21 + + dc->DcLevel.xformWorld2Vport.eDx; + point->y = x * dc->DcLevel.xformWorld2Vport.eM12 + + y * dc->DcLevel.xformWorld2Vport.eM22 + + dc->DcLevel.xformWorld2Vport.eDy; } /* Performs a viewport-to-world transformation on the specified point (which Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -150,10 +150,10 @@ FLOAT x, y; x = (FLOAT)Point->x; y = (FLOAT)Point->y; - Point->x = x * Dc->w.xformVport2World.eM11 + - y * Dc->w.xformVport2World.eM21 + Dc->w.xformVport2World.eDx; - Point->y = x * Dc->w.xformVport2World.eM12 + - y * Dc->w.xformVport2World.eM22 + Dc->w.xformVport2World.eDy; + Point->x = x * Dc->DcLevel.xformVport2World.eM11 + + y * Dc->DcLevel.xformVport2World.eM21 + Dc->DcLevel.xformVport2World.eDx; + Point->y = x * Dc->DcLevel.xformVport2World.eM12 + + y * Dc->DcLevel.xformVport2World.eM22 + Dc->DcLevel.xformVport2World.eDy; } VOID @@ -190,24 +190,24 @@ switch(Mode) { case MWT_IDENTITY: - pDc->w.xformWorld2Wnd.eM11 = 1.0f; - pDc->w.xformWorld2Wnd.eM12 = 0.0f; - pDc->w.xformWorld2Wnd.eM21 = 0.0f; - pDc->w.xformWorld2Wnd.eM22 = 1.0f; - pDc->w.xformWorld2Wnd.eDx = 0.0f; - pDc->w.xformWorld2Wnd.eDy = 0.0f; + pDc->DcLevel.xformWorld2Wnd.eM11 = 1.0f; + pDc->DcLevel.xformWorld2Wnd.eM12 = 0.0f; + pDc->DcLevel.xformWorld2Wnd.eM21 = 0.0f; + pDc->DcLevel.xformWorld2Wnd.eM22 = 1.0f; + pDc->DcLevel.xformWorld2Wnd.eDx = 0.0f; + pDc->DcLevel.xformWorld2Wnd.eDy = 0.0f; break; case MWT_LEFTMULTIPLY: - IntGdiCombineTransform(&pDc->w.xformWorld2Wnd, lpXForm, &pDc->w.xformWorld2Wnd ); + IntGdiCombineTransform(&pDc->DcLevel.xformWorld2Wnd, lpXForm, &pDc->DcLevel.xformWorld2Wnd ); break; case MWT_RIGHTMULTIPLY: - IntGdiCombineTransform(&pDc->w.xformWorld2Wnd, &pDc->w.xformWorld2Wnd, lpXForm); + IntGdiCombineTransform(&pDc->DcLevel.xformWorld2Wnd, &pDc->DcLevel.xformWorld2Wnd, lpXForm); break; case MWT_MAX+1: // Must be MWT_SET???? - pDc->w.xformWorld2Wnd = *lpXForm; // Do it like Wine. + pDc->DcLevel.xformWorld2Wnd = *lpXForm; // Do it like Wine. break; default: @@ -248,7 +248,7 @@ switch(iXform) { case GdiWorldSpaceToPageSpace: - *XForm = dc->w.xformWorld2Wnd; + *XForm = dc->DcLevel.xformWorld2Wnd; break; default: break; @@ -275,10 +275,10 @@ x = (FLOAT)Point->x; y = (FLOAT)Point->y; - Point->x = x * Dc->w.xformWorld2Vport.eM11 + - y * Dc->w.xformWorld2Vport.eM21 + Dc->w.xformWorld2Vport.eDx; - Point->y = x * Dc->w.xformWorld2Vport.eM12 + - y * Dc->w.xformWorld2Vport.eM22 + Dc->w.xformWorld2Vport.eDy; + Point->x = x * Dc->DcLevel.xformWorld2Vport.eM11 + + y * Dc->DcLevel.xformWorld2Vport.eM21 + Dc->DcLevel.xformWorld2Vport.eDx; + Point->y = x * Dc->DcLevel.xformWorld2Vport.eM12 + + y * Dc->DcLevel.xformWorld2Vport.eM22 + Dc->DcLevel.xformWorld2Vport.eDy; } VOID Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -1336,10 +1336,10 @@ nDc_Attr->ptlCurrent = Dc_Attr->ptlCurrent; nDc_Attr->ptfxCurrent = Dc_Attr->ptfxCurrent; newdc->DcLevel.flPath = dc->DcLevel.flPath; - newdc->w.xformWorld2Wnd = dc->w.xformWorld2Wnd; - newdc->w.xformWorld2Vport = dc->w.xformWorld2Vport; - newdc->w.xformVport2World = dc->w.xformVport2World; - newdc->w.vport2WorldValid = dc->w.vport2WorldValid; + newdc->DcLevel.xformWorld2Wnd = dc->DcLevel.xformWorld2Wnd; + newdc->DcLevel.xformWorld2Vport = dc->DcLevel.xformWorld2Vport; + newdc->DcLevel.xformVport2World = dc->DcLevel.xformVport2World; + nDc_Attr->flXform = Dc_Attr->flXform; nDc_Attr->ptlWindowOrg = Dc_Attr->ptlWindowOrg; nDc_Attr->szlWindowExt = Dc_Attr->szlWindowExt; nDc_Attr->ptlViewportOrg = Dc_Attr->ptlViewportOrg; @@ -1403,10 +1403,10 @@ Dc_Attr->ptlCurrent = sDc_Attr->ptlCurrent; Dc_Attr->ptfxCurrent = sDc_Attr->ptfxCurrent; dc->DcLevel.flPath = dcs->DcLevel.flPath; - dc->w.xformWorld2Wnd = dcs->w.xformWorld2Wnd; - dc->w.xformWorld2Vport = dcs->w.xformWorld2Vport; - dc->w.xformVport2World = dcs->w.xformVport2World; - dc->w.vport2WorldValid = dcs->w.vport2WorldValid; + dc->DcLevel.xformWorld2Wnd = dcs->DcLevel.xformWorld2Wnd; + dc->DcLevel.xformWorld2Vport = dcs->DcLevel.xformWorld2Vport; + dc->DcLevel.xformVport2World = dcs->DcLevel.xformVport2World; + Dc_Attr->flXform = sDc_Attr->flXform; Dc_Attr->ptlWindowOrg = sDc_Attr->ptlWindowOrg; Dc_Attr->szlWindowExt = sDc_Attr->szlWindowExt; Dc_Attr->ptlViewportOrg = sDc_Attr->ptlViewportOrg; @@ -2405,16 +2405,14 @@ if(!Dc_Attr) Dc_Attr = &NewDC->Dc_Attr; NewDC->BaseObject.hHmgr = (HGDIOBJ) hDC; // Save the handle for this DC object. - NewDC->w.xformWorld2Wnd.eM11 = 1.0f; - NewDC->w.xformWorld2Wnd.eM12 = 0.0f; - NewDC->w.xformWorld2Wnd.eM21 = 0.0f; - NewDC->w.xformWorld2Wnd.eM22 = 1.0f; - NewDC->w.xformWorld2Wnd.eDx = 0.0f; - NewDC->w.xformWorld2Wnd.eDy = 0.0f; - NewDC->w.xformWorld2Vport = NewDC->w.xformWorld2Wnd; - NewDC->w.xformVport2World = NewDC->w.xformWorld2Wnd; - NewDC->w.vport2WorldValid = TRUE; - + NewDC->DcLevel.xformWorld2Wnd.eM11 = 1.0f; + NewDC->DcLevel.xformWorld2Wnd.eM12 = 0.0f; + NewDC->DcLevel.xformWorld2Wnd.eM21 = 0.0f; + NewDC->DcLevel.xformWorld2Wnd.eM22 = 1.0f; + NewDC->DcLevel.xformWorld2Wnd.eDx = 0.0f; + NewDC->DcLevel.xformWorld2Wnd.eDy = 0.0f; + NewDC->DcLevel.xformWorld2Vport = NewDC->DcLevel.xformWorld2Wnd; + NewDC->DcLevel.xformVport2World = NewDC->DcLevel.xformWorld2Wnd; // Setup syncing bits for the dcattr data packets. Dc_Attr->flXform = DEVICE_TO_PAGE_INVALID; @@ -2603,10 +2601,13 @@ xformWnd2Vport.eDy = (FLOAT)Dc_Attr->ptlViewportOrg.y - scaleY * (FLOAT)Dc_Attr->ptlWindowOrg.y; /* Combine with the world transformation */ - IntGdiCombineTransform(&dc->w.xformWorld2Vport, &dc->w.xformWorld2Wnd, &xformWnd2Vport); + IntGdiCombineTransform(&dc->DcLevel.xformWorld2Vport, &dc->DcLevel.xformWorld2Wnd, &xformWnd2Vport); /* Create inverse of world-to-viewport transformation */ - dc->w.vport2WorldValid = DC_InvertXform(&dc->w.xformWorld2Vport, &dc->w.xformVport2World); + if (DC_InvertXform(&dc->DcLevel.xformWorld2Vport, &dc->DcLevel.xformVport2World)) + Dc_Attr->flXform &= ~DEVICE_TO_WORLD_INVALID; + else + Dc_Attr->flXform |= DEVICE_TO_WORLD_INVALID; } BOOL FASTCALL Modified: trunk/reactos/subsystems/win32/win32k/objects/dcutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dcutil.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dcutil.c [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -113,9 +113,9 @@ CopytoUserDcAttr(PDC dc, PDC_ATTR Dc_Attr) { NTSTATUS Status = STATUS_SUCCESS; - XForm2MatrixS( &dc->Dc_Attr.mxWorldToDevice, &dc->w.xformWorld2Vport); - XForm2MatrixS( &dc->Dc_Attr.mxDevicetoWorld, &dc->w.xformVport2World); - XForm2MatrixS( &dc->Dc_Attr.mxWorldToPage, &dc->w.xformWorld2Wnd); + XForm2MatrixS( &dc->Dc_Attr.mxWorldToDevice, &dc->DcLevel.xformWorld2Vport); + XForm2MatrixS( &dc->Dc_Attr.mxDevicetoWorld, &dc->DcLevel.xformVport2World); + XForm2MatrixS( &dc->Dc_Attr.mxWorldToPage, &dc->DcLevel.xformWorld2Wnd); _SEH_TRY { ProbeForWrite( Dc_Attr, Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -431,7 +431,7 @@ * tests show that resetting the graphics mode to GM_COMPATIBLE does * not reset the world transform. */ - xform = dc->w.xformWorld2Wnd; + xform = dc->DcLevel.xformWorld2Wnd; /* Set MM_TEXT */ IntGdiSetMapMode( dc, MM_TEXT ); @@ -1493,7 +1493,7 @@ IntGetViewportOrgEx(dc, &ptViewportOrg); IntGetWindowExtEx(dc, &szWindowExt); IntGetWindowOrgEx(dc, &ptWindowOrg); - xform = dc->w.xformWorld2Wnd; + xform = dc->DcLevel.xformWorld2Wnd; /* Set MM_TEXT */ Dc_Attr->iMapMode = MM_TEXT; @@ -1621,7 +1621,7 @@ Dc_Attr->ptlViewportOrg.y = ptViewportOrg.y; /* Restore the world transform */ - dc->w.xformWorld2Wnd = xform; + dc->DcLevel.xformWorld2Wnd = xform; /* If we've moved the current point then get its new position which will be in device (MM_TEXT) co-ords, convert it to Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Mon Jun 2 14:51:04 2008 @@ -2613,7 +2613,7 @@ } Dc_Attr = dc->pDc_Attr; if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; - eM11 = dc->w.xformWorld2Vport.eM11; + eM11 = dc->DcLevel.xformWorld2Vport.eM11; hFont = Dc_Attr->hlfntNew; TextObj = TEXTOBJ_LockText(hFont); DC_UnlockDc(dc);
16 years, 6 months
1
0
0
0
[gbrunmar] 33829: Added dialog FNID
by gbrunmar@svn.reactos.org
Author: gbrunmar Date: Mon Jun 2 14:15:33 2008 New Revision: 33829 URL:
http://svn.reactos.org/svn/reactos?rev=33829&view=rev
Log: Added dialog FNID Modified: trunk/reactos/dll/win32/user32/windows/dialog.c Modified: trunk/reactos/dll/win32/user32/windows/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Mon Jun 2 14:15:33 2008 @@ -159,6 +159,8 @@ return NULL; SETDLGINFO( hWnd, dlgInfo ); + + NtUserSetWindowFNID( hWnd, FNID_DIALOG ); } else {
16 years, 6 months
1
0
0
0
[jimtabor] 33828: Stefan Ginsberg <stefan__100__ at hotmail.com> - Remove old DCOrg and replace it with ptlDCOrig.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Jun 2 12:53:53 2008 New Revision: 33828 URL:
http://svn.reactos.org/svn/reactos?rev=33828&view=rev
Log: Stefan Ginsberg <stefan__100__ at
hotmail.com
> - Remove old DCOrg and replace it with ptlDCOrig. Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/intgdi.h trunk/reactos/subsystems/win32/win32k/ntuser/windc.c trunk/reactos/subsystems/win32/win32k/objects/bitblt.c trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/fillshap.c trunk/reactos/subsystems/win32/win32k/objects/line.c trunk/reactos/subsystems/win32/win32k/objects/region.c trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -64,11 +64,7 @@ GdiPath path; /* #endif */ - RECT totalExtent; BYTE bitsPerPixel; - - INT DCOrgX; /* DC origin */ - INT DCOrgY; XFORM xformWorld2Wnd; /* World-to-window transformation */ XFORM xformWorld2Vport; /* World-to-viewport transformation */ Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -135,7 +135,7 @@ /* DC functions */ BOOL FASTCALL -IntGdiGetDCOrgEx(DC *dc, LPPOINT Point); +IntGdiGetDCOrg(PDC pDC, PPOINTL pPointl); INT FASTCALL IntGdiGetObject(HANDLE handle, INT count, LPVOID buffer); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -167,21 +167,21 @@ if (Window == NULL) { - dc->w.DCOrgX = 0; - dc->w.DCOrgY = 0; + dc->ptlDCOrig.x = 0; + dc->ptlDCOrig.y = 0; } else { Wnd = Window->Wnd; if (Flags & DCX_WINDOW) { - dc->w.DCOrgX = Wnd->WindowRect.left; - dc->w.DCOrgY = Wnd->WindowRect.top; + dc->ptlDCOrig.x = Wnd->WindowRect.left; + dc->ptlDCOrig.y = Wnd->WindowRect.top; } else { - dc->w.DCOrgX = Wnd->ClientRect.left; - dc->w.DCOrgY = Wnd->ClientRect.top; + dc->ptlDCOrig.x = Wnd->ClientRect.left; + dc->ptlDCOrig.y = Wnd->ClientRect.top; } } DC_UnlockDc(dc); @@ -726,17 +726,17 @@ { if (pDCE->DCXFlags & DCX_WINDOW) { - DeltaX = CurrentWindow->Wnd->WindowRect.left - dc->w.DCOrgX; - DeltaY = CurrentWindow->Wnd->WindowRect.top - dc->w.DCOrgY; - dc->w.DCOrgX = CurrentWindow->Wnd->WindowRect.left; - dc->w.DCOrgY = CurrentWindow->Wnd->WindowRect.top; + DeltaX = CurrentWindow->Wnd->WindowRect.left - dc->ptlDCOrig.x; + DeltaY = CurrentWindow->Wnd->WindowRect.top - dc->ptlDCOrig.y; + dc->ptlDCOrig.x = CurrentWindow->Wnd->WindowRect.left; + dc->ptlDCOrig.y = CurrentWindow->Wnd->WindowRect.top; } else { - DeltaX = CurrentWindow->Wnd->ClientRect.left - dc->w.DCOrgX; - DeltaY = CurrentWindow->Wnd->ClientRect.top - dc->w.DCOrgY; - dc->w.DCOrgX = CurrentWindow->Wnd->ClientRect.left; - dc->w.DCOrgY = CurrentWindow->Wnd->ClientRect.top; + DeltaX = CurrentWindow->Wnd->ClientRect.left - dc->ptlDCOrig.x; + DeltaY = CurrentWindow->Wnd->ClientRect.top - dc->ptlDCOrig.y; + dc->ptlDCOrig.x = CurrentWindow->Wnd->ClientRect.left; + dc->ptlDCOrig.y = CurrentWindow->Wnd->ClientRect.top; } if (NULL != dc->w.hClipRgn) { Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -87,10 +87,10 @@ } /* Offset the destination and source by the origin of their DCs. */ - XOriginDest += DCDest->w.DCOrgX; - YOriginDest += DCDest->w.DCOrgY; - XOriginSrc += DCSrc->w.DCOrgX; - YOriginSrc += DCSrc->w.DCOrgY; + XOriginDest += DCDest->ptlDCOrig.x; + YOriginDest += DCDest->ptlDCOrig.y; + XOriginSrc += DCSrc->ptlDCOrig.x; + YOriginSrc += DCSrc->ptlDCOrig.y; DestRect.left = XOriginDest; DestRect.top = YOriginDest; @@ -228,12 +228,12 @@ if (!Dc_Attr) Dc_Attr = &DCDest->Dc_Attr; /* Offset the destination and source by the origin of their DCs. */ - XDest += DCDest->w.DCOrgX; - YDest += DCDest->w.DCOrgY; + XDest += DCDest->ptlDCOrig.x; + YDest += DCDest->ptlDCOrig.y; if (UsesSource) { - XSrc += DCSrc->w.DCOrgX; - YSrc += DCSrc->w.DCOrgY; + XSrc += DCSrc->ptlDCOrig.x; + YSrc += DCSrc->ptlDCOrig.y; } DestRect.left = XDest; @@ -392,10 +392,10 @@ } /* Offset positions */ - xDst += DCDest->w.DCOrgX; - yDst += DCDest->w.DCOrgY; - xSrc += DCSrc->w.DCOrgX; - ySrc += DCSrc->w.DCOrgY; + xDst += DCDest->ptlDCOrig.x; + yDst += DCDest->ptlDCOrig.y; + xSrc += DCSrc->ptlDCOrig.x; + ySrc += DCSrc->ptlDCOrig.y; BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap); if (!BitmapDest) @@ -796,13 +796,13 @@ } /* Offset the destination and source by the origin of their DCs. */ - // FIXME: DCOrg is in device coordinates! - XOriginDest += DCDest->w.DCOrgX; - YOriginDest += DCDest->w.DCOrgY; + // FIXME: ptlDCOrig is in device coordinates! + XOriginDest += DCDest->ptlDCOrig.x; + YOriginDest += DCDest->ptlDCOrig.y; if (UsesSource) { - XOriginSrc += DCSrc->w.DCOrgX; - YOriginSrc += DCSrc->w.DCOrgY; + XOriginSrc += DCSrc->ptlDCOrig.x; + YOriginSrc += DCSrc->ptlDCOrig.y; } DestRect.left = XOriginDest; @@ -964,30 +964,30 @@ { if (Width > 0) { - DestRect.left = XLeft + dc->w.DCOrgX; - DestRect.right = XLeft + Width + dc->w.DCOrgX; + DestRect.left = XLeft + dc->ptlDCOrig.x; + DestRect.right = XLeft + Width + dc->ptlDCOrig.x; } else { - DestRect.left = XLeft + Width + 1 + dc->w.DCOrgX; - DestRect.right = XLeft + dc->w.DCOrgX + 1; + DestRect.left = XLeft + Width + 1 + dc->ptlDCOrig.x; + DestRect.right = XLeft + dc->ptlDCOrig.x + 1; } if (Height > 0) { - DestRect.top = YLeft + dc->w.DCOrgY; - DestRect.bottom = YLeft + Height + dc->w.DCOrgY; + DestRect.top = YLeft + dc->ptlDCOrig.y; + DestRect.bottom = YLeft + Height + dc->ptlDCOrig.y; } else { - DestRect.top = YLeft + Height + dc->w.DCOrgY + 1; - DestRect.bottom = YLeft + dc->w.DCOrgY + 1; + DestRect.top = YLeft + Height + dc->ptlDCOrig.y + 1; + DestRect.bottom = YLeft + dc->ptlDCOrig.y + 1; } IntLPtoDP(dc, (LPPOINT)&DestRect, 2); - BrushOrigin.x = BrushObj->ptOrigin.x + dc->w.DCOrgX; - BrushOrigin.y = BrushObj->ptOrigin.y + dc->w.DCOrgY; + BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x; + BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y; IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlateBrush); Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -256,8 +256,8 @@ DC_UnlockDc(dc); return Result; } - XPos += dc->w.DCOrgX; - YPos += dc->w.DCOrgY; + XPos += dc->ptlDCOrig.x; + YPos += dc->ptlDCOrig.y; if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) ) { bInRect = TRUE; Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -34,7 +34,7 @@ NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hVisRgn, 0, RGN_COPY); else NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hClipRgn, Dc->w.hVisRgn, RGN_AND); - NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->w.DCOrgX, Dc->w.DCOrgY); + NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y); if((CombinedRegion = REGION_LockRgn(Dc->w.hGCClipRgn))) { @@ -55,7 +55,7 @@ return ERROR; } - return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY); + return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->ptlDCOrig.x, -Dc->ptlDCOrig.y); } INT FASTCALL @@ -86,7 +86,7 @@ retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY); if ( retval != ERROR ) { - NtGdiOffsetRgn(dc->w.hVisRgn, -dc->w.DCOrgX, -dc->w.DCOrgY); + NtGdiOffsetRgn(dc->w.hVisRgn, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y); CLIPPING_UpdateGCRegion(dc); } DC_UnlockDc(dc); Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -1134,15 +1134,6 @@ return SelObject; } -BOOL FASTCALL -IntGdiGetDCOrgEx(DC *dc, LPPOINT Point) -{ - Point->x = dc->w.DCOrgX; - Point->y = dc->w.DCOrgY; - - return TRUE; -} - LONG FASTCALL IntCalcFillOrigin(PDC pdc) { @@ -1261,7 +1252,7 @@ IntGetWindowOrgEx(dc, &SafePoint); break; case GdiGetDCOrg: - Ret = IntGdiGetDCOrgEx(dc, &SafePoint); + Ret = IntGdiGetDCOrg(dc, &SafePoint); break; case GdiGetAspectRatioFilter: Ret = IntGetAspectRatioFilter(dc, &Size); @@ -1319,7 +1310,6 @@ nDc_Attr->hlfntNew = Dc_Attr->hlfntNew; newdc->w.hBitmap = dc->w.hBitmap; newdc->DcLevel.hpal = dc->DcLevel.hpal; - newdc->w.totalExtent = dc->w.totalExtent; newdc->w.bitsPerPixel = dc->w.bitsPerPixel; nDc_Attr->jROP2 = Dc_Attr->jROP2; nDc_Attr->jFillMode = Dc_Attr->jFillMode; @@ -1340,8 +1330,8 @@ nDc_Attr->iGraphicsMode = Dc_Attr->iGraphicsMode; #if 0 /* Apparently, the DC origin is not changed by [GS]etDCState */ - newdc->w.DCOrgX = dc->w.DCOrgX; - newdc->w.DCOrgY = dc->w.DCOrgY; + newdc->ptlDCOrig.x = dc->ptlDCOrig.x; + newdc->ptlDCOrig.y = dc->ptlDCOrig.y; #endif nDc_Attr->ptlCurrent = Dc_Attr->ptlCurrent; nDc_Attr->ptfxCurrent = Dc_Attr->ptfxCurrent; @@ -1387,7 +1377,6 @@ dc->DcLevel.flPath = dcs->DcLevel.flPath & ~DCPATH_SAVE; Dc_Attr->dwLayout = sDc_Attr->dwLayout; - dc->w.totalExtent = dcs->w.totalExtent; Dc_Attr->jROP2 = sDc_Attr->jROP2; Dc_Attr->jFillMode = sDc_Attr->jFillMode; Dc_Attr->jStretchBltMode = sDc_Attr->jStretchBltMode; @@ -1408,8 +1397,8 @@ Dc_Attr->iGraphicsMode = sDc_Attr->iGraphicsMode; #if 0 /* Apparently, the DC origin is not changed by [GS]etDCState */ - dc->w.DCOrgX = dcs->w.DCOrgX; - dc->w.DCOrgY = dcs->w.DCOrgY; + dc->ptlDCOrig.x = dcs->ptlDCOrig.x; + dc->ptlDCOrig.y = dcs->ptlDCOrig.y; #endif Dc_Attr->ptlCurrent = sDc_Attr->ptlCurrent; Dc_Attr->ptfxCurrent = sDc_Attr->ptfxCurrent; Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -73,8 +73,8 @@ IntLPtoDP(dc, UnsafePoints, Count); for (CurrentPoint = 0; CurrentPoint < Count; CurrentPoint++) { - UnsafePoints[CurrentPoint].x += dc->w.DCOrgX; - UnsafePoints[CurrentPoint].y += dc->w.DCOrgY; + UnsafePoints[CurrentPoint].x += dc->ptlDCOrig.x; + UnsafePoints[CurrentPoint].y += dc->ptlDCOrig.y; } if (PATH_IsPathOpen(dc->w.path)) @@ -273,10 +273,10 @@ IntLPtoDP(dc, (LPPOINT)&RectBounds, 2); - RectBounds.left += dc->w.DCOrgX; - RectBounds.right += dc->w.DCOrgX; - RectBounds.top += dc->w.DCOrgY; - RectBounds.bottom += dc->w.DCOrgY; + RectBounds.left += dc->ptlDCOrig.x; + RectBounds.right += dc->ptlDCOrig.x; + RectBounds.top += dc->ptlDCOrig.y; + RectBounds.bottom += dc->ptlDCOrig.y; RadiusX = max((RectBounds.right - RectBounds.left) >> 1, 1); RadiusY = max((RectBounds.bottom - RectBounds.top) >> 1, 1); @@ -683,14 +683,14 @@ return FALSE; } - Left += dc->w.DCOrgX; - Right += dc->w.DCOrgX; - Top += dc->w.DCOrgY; - Bottom += dc->w.DCOrgY; - XRadialStart += dc->w.DCOrgX; - YRadialStart += dc->w.DCOrgY; - XRadialEnd += dc->w.DCOrgX; - YRadialEnd += dc->w.DCOrgY; + Left += dc->ptlDCOrig.x; + Right += dc->ptlDCOrig.x; + Top += dc->ptlDCOrig.y; + Bottom += dc->ptlDCOrig.y; + XRadialStart += dc->ptlDCOrig.x; + YRadialStart += dc->ptlDCOrig.y; + XRadialEnd += dc->ptlDCOrig.x; + YRadialEnd += dc->ptlDCOrig.y; RectBounds.left = Left; RectBounds.right = Right; @@ -1047,10 +1047,10 @@ } else { - LeftRect += dc->w.DCOrgX; - RightRect += dc->w.DCOrgX - 1; - TopRect += dc->w.DCOrgY; - BottomRect += dc->w.DCOrgY - 1; + LeftRect += dc->ptlDCOrig.x; + RightRect += dc->ptlDCOrig.x - 1; + TopRect += dc->ptlDCOrig.y; + BottomRect += dc->ptlDCOrig.y - 1; DestRect.left = LeftRect; DestRect.right = RightRect; @@ -1207,10 +1207,10 @@ xradius = xCurveDiameter >> 1; yradius = yCurveDiameter >> 1; - left += dc->w.DCOrgX; - right += dc->w.DCOrgX; - top += dc->w.DCOrgY; - bottom += dc->w.DCOrgY; + left += dc->ptlDCOrig.x; + right += dc->ptlDCOrig.x; + top += dc->ptlDCOrig.y; + bottom += dc->ptlDCOrig.y; RectBounds.left = left; RectBounds.right = right; @@ -1540,8 +1540,8 @@ Extent.bottom = max(Extent.bottom, (pVertex + i)->y); } - DitherOrg.x = dc->w.DCOrgX; - DitherOrg.y = dc->w.DCOrgY; + DitherOrg.x = dc->ptlDCOrig.x; + DitherOrg.y = dc->ptlDCOrig.y; Extent.left += DitherOrg.x; Extent.right += DitherOrg.x; Extent.top += DitherOrg.y; Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -130,10 +130,10 @@ IntLPtoDP(dc, Points, 2); /* The DCOrg is in device coordinates */ - Points[0].x += dc->w.DCOrgX; - Points[0].y += dc->w.DCOrgY; - Points[1].x += dc->w.DCOrgX; - Points[1].y += dc->w.DCOrgY; + Points[0].x += dc->ptlDCOrig.x; + Points[0].y += dc->ptlDCOrig.y; + Points[1].x += dc->ptlDCOrig.x; + Points[1].y += dc->ptlDCOrig.y; Bounds.left = min(Points[0].x, Points[1].x); Bounds.top = min(Points[0].y, Points[1].y); @@ -281,8 +281,8 @@ /* Offset the array of point by the dc->w.DCOrg */ for (i = 0; i < Count; i++) { - Points[i].x += dc->w.DCOrgX; - Points[i].y += dc->w.DCOrgY; + Points[i].x += dc->ptlDCOrig.x; + Points[i].y += dc->ptlDCOrig.y; } IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -2645,7 +2645,7 @@ } if (iCode == SYSRGN) { - IntGdiGetDCOrgEx(pDC, &org); + IntGdiGetDCOrg(pDC, &org); NtGdiOffsetRgn(hDest, org.x, org.y ); } @@ -2828,7 +2828,7 @@ /* ei enable later // Transform region into device co-ords - if (!REGION_LPTODP(hDC, tmpVisRgn, hRgn) || NtGdiOffsetRgn(tmpVisRgn, dc->w.DCOrgX, dc->w.DCOrgY) == ERROR) + if (!REGION_LPTODP(hDC, tmpVisRgn, hRgn) || NtGdiOffsetRgn(tmpVisRgn, dc->ptlDCOrig.x, dc->ptlDCOrig.y) == ERROR) { NtGdiDeleteObject(tmpVisRgn); DC_UnlockDc(dc); Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Mon Jun 2 12:53:53 2008 @@ -1626,8 +1626,8 @@ Start.x = XStart; Start.y = YStart; IntLPtoDP(dc, &Start, 1); - RealXStart = (Start.x + dc->w.DCOrgX) << 6; - YStart = Start.y + dc->w.DCOrgY; + RealXStart = (Start.x + dc->ptlDCOrig.x) << 6; + YStart = Start.y + dc->ptlDCOrig.y; /* Create the brushes */ hDestPalette = BitmapObj->hDIBPalette; @@ -1685,10 +1685,10 @@ if ((fuOptions & ETO_OPAQUE) && lprc) { - DestRect.left = SpecifiedDestRect.left + dc->w.DCOrgX; - DestRect.top = SpecifiedDestRect.top + dc->w.DCOrgY; - DestRect.right = SpecifiedDestRect.right + dc->w.DCOrgX; - DestRect.bottom = SpecifiedDestRect.bottom + dc->w.DCOrgY; + DestRect.left = SpecifiedDestRect.left + dc->ptlDCOrig.x; + DestRect.top = SpecifiedDestRect.top + dc->ptlDCOrig.y; + DestRect.right = SpecifiedDestRect.right + dc->ptlDCOrig.x; + DestRect.bottom = SpecifiedDestRect.bottom + dc->ptlDCOrig.y; IntLPtoDP(dc, (LPPOINT)&DestRect, 2); IntEngBitBlt( &BitmapObj->SurfObj, @@ -1956,12 +1956,6 @@ DestRect.top = TextTop + yoff - realglyph2->top; DestRect.bottom = DestRect.top + realglyph2->bitmap.rows; -// DbgPrint("lrtb %d %d %d %d\n", DestRect.left, DestRect.right, -// DestRect.top, DestRect.bottom); -// DbgPrint("specified lrtb %d %d %d %d\n", SpecifiedDestRect.left, SpecifiedDestRect.right, -// SpecifiedDestRect.top, SpecifiedDestRect.bottom); -// DbgPrint ("dc->w.DCOrgX: %d\n", dc->w.DCOrgX); - bitSize.cx = realglyph2->bitmap.width; bitSize.cy = realglyph2->bitmap.rows; MaskRect.right = realglyph2->bitmap.width; @@ -2005,12 +1999,12 @@ if (lprc && (fuOptions & ETO_CLIPPED) && - DestRect.right >= SpecifiedDestRect.right + dc->w.DCOrgX) + DestRect.right >= SpecifiedDestRect.right + dc->ptlDCOrig.x) { // We do the check '>=' instead of '>' to possibly save an iteration // through this loop, since it's breaking after the drawing is done, // and x is always incremented. - DestRect.right = SpecifiedDestRect.right + dc->w.DCOrgX; + DestRect.right = SpecifiedDestRect.right + dc->ptlDCOrig.x; DoBreak = TRUE; }
16 years, 6 months
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200