mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +00:00
partly implement gdi32 Escape need it for getting opengl icd driver working, if they are using ms icd ddk
implemented command DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE for they are not longer supported in windows XP/2003 implemented command SETABORTPROC it is still stub in gdi32/misc/stubs.c svn path=/trunk/; revision=32635
This commit is contained in:
parent
b9cb142148
commit
b6b6d6b267
1 changed files with 40 additions and 10 deletions
|
@ -620,8 +620,7 @@ int
|
|||
STDCALL
|
||||
SetAbortProc(
|
||||
HDC hdc,
|
||||
ABORTPROC a1
|
||||
)
|
||||
ABORTPROC lpAbortProc)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
@ -1535,6 +1534,34 @@ Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
|
|||
}
|
||||
break;
|
||||
|
||||
case DRAFTMODE:
|
||||
case FLUSHOUTPUT:
|
||||
case SETCOLORTABLE:
|
||||
/* Note 1: DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE is outdated and been replace with other api */
|
||||
/* Note 2: Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
|
||||
* ReactOS copy this behoir to be compatible with windows 2003
|
||||
*/
|
||||
if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
|
||||
(pUserData == NULL) )
|
||||
{
|
||||
GdiSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
retValue = FALSE;
|
||||
break;
|
||||
|
||||
case SETABORTPROC:
|
||||
/* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
|
||||
* ReactOS copy this behoir to be compatible with windows 2003
|
||||
*/
|
||||
if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
|
||||
(pUserData == NULL) )
|
||||
{
|
||||
GdiSetLastError(ERROR_INVALID_HANDLE);
|
||||
retValue = FALSE;
|
||||
}
|
||||
retValue = SetAbortProc(hdc, (ABORTPROC)lpvInData);
|
||||
break;
|
||||
|
||||
case GETCOLORTABLE:
|
||||
retValue = GetSystemPaletteEntries(hdc, (UINT)*lpvInData, 1, (LPPALETTEENTRY)lpvOutData);
|
||||
if ( !retValue )
|
||||
|
@ -1543,10 +1570,6 @@ Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
|
|||
}
|
||||
break;
|
||||
|
||||
case GETEXTENDEDTEXTMETRICS:
|
||||
retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
|
||||
break;
|
||||
|
||||
case GETSCALINGFACTOR:
|
||||
/* Note GETSCALINGFACTOR is outdated have been replace by GetDeviceCaps */
|
||||
if ( Type == GDI_OBJECT_TYPE_DC )
|
||||
|
@ -1561,6 +1584,13 @@ Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
|
|||
retValue = FALSE;
|
||||
break;
|
||||
|
||||
case GETEXTENDEDTEXTMETRICS:
|
||||
retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
UNIMPLEMENTED;
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue